An Integrated Approach to Water-Energy Nexus in Shale-Gas Production

Shale gas production is associated with significant usage of fresh water and discharge of wastewater. Consequently, there is a necessity to create proper management strategies for water resources in shale gas production and to integrate conventional energy sources (e.g., shale gas) with renewables (e.g., solar energy). The objective of this study is to develop a design framework for integrating water and energy systems including multiple energy sources, the cogeneration process and desalination technologies in treating wastewater and providing fresh water for shale gas production. Solar energy is included to provide thermal power directly to a multi-effect distillation plant (MED) exclusively (to be more feasible economically) or indirect supply through a thermal energy storage system. Thus, MED is driven by direct or indirect solar energy and excess or direct cogeneration process heat. The proposed thermal energy storage along with the fossil fuel boiler will allow for the dual-purpose system to operate at steady-state by managing the dynamic variability of solar energy. Additionally, electric production is considered to supply a reverse osmosis plant (RO) without connecting to the local electric grid. A multi-period mixed integer nonlinear program (MINLP) is developed and applied to discretize the operation period to track the diurnal fluctuations of solar energy. The solution of the optimization program determines the optimal mix of solar energy, thermal storage and fossil fuel to attain the maximum annual profit of the entire system. A case study is solved for water treatment and energy management for Eagle Ford Basin in Texas.


Introduction
Recently, major discoveries of shale gas reserves have led to substantial growth in production.For instance, the U.S. production of shale gas has increased from 2 trillion ft 3 in 2007 to 17 trillion ft 3 in 2016 with an estimated cumulative production of more than 400 trillion ft 3 over the next two decades [1].Consequently, there are tremendous monetization opportunities to convert shale gas into value-added chemicals and fuels such as methanol, olefins, aromatics and liquid transportation fuels [2][3][4][5][6][7][8][9].A major challenge to a more sustainable growth of shale gas production is the need to address natural resource, environmental] and safety issues [10,11].Specifically, the excessive usage of fresh water and discharge of wastewater constitute major problems.Hydraulic fracturing and horizontal drilling are the essential technologies to extract natural gas from shale rock.Water plays a significant role in shale gas production through mixing millions of gallons of water with sand, chemicals, corrosion inhibitors, surfactants, flow improvers, friction reducers and other constituents to produce fracturing fluid.Under the high pressure, the fracturing fluid is injected into the wellbore to make cracks within the rock layers to increase the production [12,13].Large quantities of water are used in the fracturing and related process [14].The typical annual water consumption per well for hydraulic fracturing ranges between 1000 and 30,000 m 3 , leading to substantial amounts of water usage.For instance, the annual water usage in shale gas production is estimated to be about 120 MM m 3 .In the Eagle Ford Shale Play, the annual water use is 18 MM m 3 for 1040 wells [15].Wastewater associated with shale gas production is discharged in two forms: flowback water (which is released over several weeks following production) and produced water (which is the long-term wastewater) [14,16].Treatment of shale gas wastewater followed by recycling and reuse can provide major economic and environmental benefits [12][13][14][15][16][17].Regrettably, a small fraction of the shale-gas wastewater is recycled.A recent study [18] reported that in 2014, less than 10% of the roughly 80,000 wells in the U.S. used recycled water after proper treatment.Lira-Barragán et al. [18] developed a mathematical programming model for the combination of water networks in the shale gas site by taking into consideration the requirement of water, the uncertainty of used and flowback water, and the optimal size of treatment units, storage systems and disposals.Gao and You [12] addressed the shale-gas water problem as a mixed integer linear fractional programming (MILFP) problem to maximize the profit per unit of freshwater consumption.Yang et al. [14] developed a two-stage mixed integer nonlinear programming (MINLP) model for shale gas formations with the uncertainty of water availability.Several approaches may be used for treatment and management of shale gas wastewater [13][14][15][16][17][18][19][20].These approaches include conventional technologies such as multi-effect distillation and reverse osmosis.Additionally, emerging technologies such as membrane distillation may be used to exploit excess heat from flared gases, compression stations and other on-site sources and to provide a modular system with high levels of salt rejection [16,[21][22][23][24][25][26][27][28][29].Additionally, renewable energy (such as solar) may be utilized to enhance the sustainability of the system.Therefore, it is important to consider the water management problem for shale gas production via a water-energy nexus framework.
This work is aimed at developing a new systematic approach to the design, operation, integration and optimization of a dual-purpose system, which integrates solar energy and fossil fuels to produce electricity and desalinated water while treating shale-gas wastewater.In addition to fossil fuels, a concentrated solar power field, a thermal storage system, conventional steam generators and the cogeneration process are coupled with two water treatment plants: reverse osmosis (RO) and multiple-effect distillation (MED).A multi-period mixed integer nonlinear program (MINLP) formulation is developed to account for the diurnal fluctuations of solar energy.The solution of the mixed integer nonlinear program (MINLP) determines the optimal mix of solar energy, thermal storage and fossil fuel and the details of wastewater treatment and water recycling.

Problem Statement
Consider a shale-gas production site with the following known information:

•
Flowrate and characteristics of produced and flared shale gas.

•
Demand for fresh water (flowrate and quality).

•
Flowrate and characteristics of flowback and produced wastewater.
The site is not connected to an external power grid.
It is desired to systematically design an integrated system that: • Treats the wastewater for on-site recycling/reuse.

•
Uses solar energy and fossil fuels to provide the needed electric and thermal power needs.

•
Satisfies technical, economic and environmental requirements.
Given are: • Flowrate and composition of shale gas (sold and flared).

•
Flowrate and purity needs for fresh water.

•
Total volumetric flow of wastewater (flow-back and produced water) of shale gas play.

•
Flowrate of flared gases that may be used in the cogeneration process.

•
Electric energy requirement for RO and MED (kWh e /m 3 ).
To solve the problem, the following questions should be addressed: • What is the maximum annual profit of the whole system for producing desalinated water and electricity for the various percentage contributions of RO and MED in the total desalinated water production?

•
What is the minimum total annual cost of the entire system?

•
What is the economic feasibility of the system?

•
What is the optimal mix of solar energy, thermal storage and fossil fuel for the MED plant and the entire system?• What is the optimal design and integration of the system?

•
What are the optimal values of the design and operating variables of the system (e.g., minimum area of a solar collector, maximum capacity of a thermal storage system, etc.)?

•
What is the feasible range of the percentage contribution of RO and MED in the total desalinated water production?
The superstructure integrates the primary components of solar energy and fossil fuels to produce electricity and desalinated water, as shown in Figure 1:

•
To achieve a steady supply of thermal power to the whole system, solar energy (as direct solar thermal power), fossil fuel (shale gas, flared gas) and thermal energy storage (as indirect solar thermal power) are used.

•
Solar energy is used as a source of heat to provide thermal power directly to the MED plant exclusively (to be more economically feasible), while the surplus thermal power is stored.

•
A two-stage turbine is used to enhance the cogeneration process efficiency.

•
Flowrate of flared gases that may be used in the cogeneration process.
To solve the problem, the following questions should be addressed: • What is the maximum annual profit of the whole system for producing desalinated water and electricity for the various percentage contributions of RO and MED in the total desalinated water production?• What is the minimum total annual cost of the entire system?• What is the economic feasibility of the system?• What is the optimal mix of solar energy, thermal storage and fossil fuel for the MED plant and the entire system?• What is the optimal design and integration of the system?• What are the optimal values of the design and operating variables of the system (e.g., minimum area of a solar collector, maximum capacity of a thermal storage system, etc.)?

•
What is the feasible range of the percentage contribution of RO and MED in the total desalinated water production?
The superstructure integrates the primary components of solar energy and fossil fuels to produce electricity and desalinated water, as shown in Figure 1:

•
To achieve a steady supply of thermal power to the whole system, solar energy (as direct solar thermal power), fossil fuel (shale gas, flared gas) and thermal energy storage (as indirect solar thermal power) are used.

•
Solar energy is used as a source of heat to provide thermal power directly to the MED plant exclusively (to be more economically feasible), while the surplus thermal power is stored.

•
A two-stage turbine is used to enhance the cogeneration process efficiency.

Approach
A hierarchical design is proposed to efficiently address the water-energy nexus problem. Figure 2 demonstrates the main steps of the approach.The first step is to gather the required data for the system, then to select and formulate the appropriate models that describe the major system

Approach
A hierarchical design is proposed to efficiently address the water-energy nexus problem. Figure 2 demonstrates the main steps of the approach.The first step is to gather the required data for the system, then to select and formulate the appropriate models that describe the major system components.Once the preceding steps are achieved, the computational optimization is applied to the integrated system to maximize the annual profit of the system that produces a specific level of desalinated water and electricity.In treating wastewater, focus is given to the management of flowback and produced shale gas wastewater.To decompose the optimization problem, the percentage contribution of RO and MED to treating wastewater is iteratively discretized.It is worth noting that the proposed discretization approach offers significant reduction in the complexity of solving the optimization problem.Such decomposition leads to computational efficiency.Similar approaches have been proposed earlier in the literature for other applications [23,30,31].For each discretization, the RO and MED systems are designed separately because their treatment tasks for the iterative discretization are known.Consequently, the thermal and electric loads are calculated.Next, a multi-period mixed-integer nonlinear program (MINLP) is solved using the software LINGO to optimize the power mix for each period.Upon identification of the solar load, the solar area and storage capacity are calculated, and the total annual profit of the system is calculated.The procedure is repeated for the selected discretizations of the fractional contribution of RO and MED.The results are compared, and the maximum-profit solution is selected.
Processes 2018, 6, x FOR PEER REVIEW 4 of 25 components.Once the preceding steps are achieved, the computational optimization is applied to the integrated system to maximize the annual profit of the system that produces a specific level of desalinated water and electricity.In treating wastewater, focus is given to the management of flowback and produced shale gas wastewater.To decompose the optimization problem, the percentage contribution of RO and MED to treating wastewater is iteratively discretized.It is worth noting that the proposed discretization approach offers significant reduction in the complexity of solving the optimization problem.Such decomposition leads to computational efficiency.Similar approaches have been proposed earlier in the literature for other applications [23,30,31].For each discretization, the RO and MED systems are designed separately because their treatment tasks for the iterative discretization are known.Consequently, the thermal and electric loads are calculated.
Next, a multi-period mixed-integer nonlinear program (MINLP) is solved using the software LINGO to optimize the power mix for each period.Upon identification of the solar load, the solar area and storage capacity are calculated, and the total annual profit of the system is calculated.The procedure is repeated for the selected discretizations of the fractional contribution of RO and MED.The results are compared, and the maximum-profit solution is selected.

Modeling the Building Blocks
The performance models for MED and RO have been taken from the literature [32][33][34][35][36].For the solar system, a parabolic trough collector was selected.The modeling of the solar system was based on literature models and data [37][38][39][40] as described in this section.The solar thermal power (per unit length of a collector) produced by the solar field when the direct normal irradiance (DNI) strikes the collector aperture plane is given by the following expression: where DNI (W/m ) is the direct normal irradiance, Ɵ is the solar incidence angle and (m) is the width of the collector aperture.
For the north-south orientation, the incidence angle is calculated as follows: where Ɵ is the solar zenith angle, δ is the declination and ω is the hour angle.

Modeling the Building Blocks
The performance models for MED and RO have been taken from the literature [32][33][34][35][36].For the solar system, a parabolic trough collector was selected.The modeling of the solar system was based on literature models and data [37][38][39][40] as described in this section.The solar thermal power (per unit length of a collector) produced by the solar field when the direct normal irradiance (DNI) strikes the collector aperture plane is given by the following expression: where DNI (W/m 2 ) is the direct normal irradiance, θ is the solar incidence angle and W c (m) is the width of the collector aperture.
For the north-south orientation, the incidence angle is calculated as follows: where θ z is the solar zenith angle, δ is the declination and ω is the hour angle.
To calculate the thermal power (per unit length of a collector) absorbed by the receiver tube of a collector loop, the influences of the optical losses can be taken into consideration by inserting four parameters into the equation given by the following expression: where η opt is the peak optical efficiency of a collector, K(θ) is the incidence angle modifier, F f is the soiling factor (mirror cleanliness), R SL is the row shadow loss and O EL is the optical end loss.
The peak optical efficiency of a collector when the incidence angle on the aperture plane is 0 • is: where ρ is the reflectivity, γ is the intercept factor, τ is the glass transmissivity and α is the absorptivity of the receiver pipe.The incidence angle modifier for an LS-3 collector is given by: The row shadow factor is: where L spacing (m) is the length of spacing between troughs.The optical end loss is: where f is focal length of the collectors (m) and L SCA is the length of a single collector assembly (m).The total thermal power (per unit length of a collector) loss from a collector represents the combination of the radiative heat loss from the receiver pipe to the ambient environment (Q reciever→ambient ) and convective and conductive heat losses from the receiver pipe to its outer glass pipe (Q receiver→glass ) and is calculated by the following expression: where U rec W/m 2 rec •K is the overall heat transfer coefficient of a receiver pipe, d 0 (m) is the outer diameter of a receiver pipe, T rec (K) is the mean receiver pipe temperature and T amb (K) is the ambient air temperature.
The overall heat transfer coefficient of a collector is found experimentally depending on the receiver pipe temperature, and it can be given in the second-order polynomial equation: where the a, b and c coefficients have been calculated experimentally for the LS-3 collector and have been reported in the literature [37].
The thermal power (per unit length of a collector) that transferred from a collector to a fluid is given in the following expression [41]: The thermal power (per unit length of a collector) loss from the headers (pipes) is given in the following expression [42]: The thermal power (per unit length of a collector) loss from the expansion tank (vessel) is given in the following expression [42]: The useful thermal power (per unit length of a collector) produced by the solar field is given by the following expression, which represents the sum of Equations ( 10)-( 12): The inlet thermal power of the thermal storage is given in the following expression: The expression of the discharge process (outlet thermal power) is given by: where m ms is the molten salt flow rate (kg/s), (C P,ms = 1443 + 0.172 T ms ) is the specific heat of the molten salt (J/kg• • C), T ms is the temperature ( • C) of the molten salt, T HT is the hot tank temperature ( • C), T CT is the cold tank temperature ( • C), η EX is the efficiency of the heat exchanger, m oil is the oil mass flowrate (kg/s) and ∆T is the difference between the inlet and outlet of the oil.
where Q acc is the accumulated thermal power in the tank from preceding iterations and Q loss is the thermal power loss (kW/m 2 ) of the cold and heat tanks, and it is given in the following empirical equation [43]: where T ms is the temperature ( • C) of the molten salt in the hot and in the cold tanks.
The optimal values of the Rankine cycle parameters of the cogeneration process can be satisfied by formulating the entire cycle as an optimization problem.Thus, there is a necessity to obtain suitable correlations of the thermodynamic properties that can be used in the optimization formulations.In the thermodynamic calculations of the Rankine cycle, mathematical equations are used to replace the steam tables because they could easily be incorporated into the optimization formulations.However, available correlations for steam tables are complicated (e.g., nonlinear, nonconvex function), and it is hard to insert them into the optimization task.Consequently, a new set of thermodynamic correlations has been developed in the literature [44] to estimate the properties of steam, and they can be incorporated easily into the optimization formulation and cogeneration design.The isentropic efficiency of the steam turbine can be obtained from the turbine hardware model, which was developed by Mavromatis and Kokossis [45], to show the efficiency variation with the load, the turbine size and operating conditions, as in the following correlation: where .
m is the inlet turbine steam flowrate (Ib/h), m max is the maximum mass flowrate of a turbine (Ib/h) and A and B are parameters that depend on the inlet saturation temperature ( • F) and the type of turbine as in the following correlations: where a o , a 1 , a 2 , a 3 are the correlation constants and can be found in the literature [46].

Optimization Formulation
Because of the diurnal nature of solar energy, a multi-period approach is adopted.The annual operation is discretized into a number of operational periods (e.g., monthly).The index m refers to the operational period.For each operational period, an average meteorological day is used to represent the solar intensity data.In turn, the meteorological day is discretized into a number of sub-periods (e.g., 24 h) where the index t is used to designate a sub-period.Two water-treatment technologies are used: multi-effect distillation (MED) and reverse osmosis (RO).MED consumes mostly thermal energy and some electric energy, which are respectively given by the specific requirements: q MED (kWh t /m 3 ) and e MED (kWh e /m 3 ).RO requires electric energy, which is represented by the following specific energy consumption term: e RO (kWh e /m 3 ).
For each sub-period t, the thermal power needs for water treatment are obtained directly from the combustion of fossil fuels (Q Fossil t,m ), directly from a solar thermal collector (Q Direct,SC t,m ), indirectly from solar energy through thermal storage (Q Out_Stored_SC t,m ) and from steam leaving the cogeneration turbine (Q Turbine t,m ).Hence, where: The electric power provided by the cogeneration turbine is given by: The thermal power captured by the solar collector ( ) or is stored ) for subsequent usage, i.e., Over a sub-period, t, the thermal power balance for the thermal storage unit is given by: Such collected energy is a function of the solar-radiation intensity (Solar_Radiation t,m ) and the effective surface area of the solar collector (A SC ).
Although each period requires a certain area of the solar collector, the design value (which is also used for capital cost estimation) is the largest of all needed areas, i.e., The cogeneration turbine is modelled through a performance function (e.g., isentropic expansion with an efficiency) that combines inlet and outlet steam conditions and relates the produced power to heat.
The objective function seeks to maximize the profit for the water-energy nexus system: Maximize annual profit = annual value of treated water + annual value of avoided cost of discharging wastewater − cost of fossil fuels − total annualized cost of solar collection system − total annualized cost of solar storage system − total annualized cost of cogeneration system − total annualized cost of MED system − total annualized cost of RO system: It is worth noting that the economic objective function can be altered to include sustainability and safety metrics by using the sustainability and safety weighted return on investment metrics [47,48].

Case Study
To demonstrate the viability of the proposed approach for solution strategies, a case study will be solved based on the Eagle Ford Shale Play, which is located in south Texas.A dual-purpose system that integrates solar energy and fossil fuels for producing electricity and fresh water has been considered.The optimal design, operation and integration of the system will be found through this case study, which requires particular input data for each unit of the entire system.As mentioned earlier, this system includes the concentrated solar power field, a thermal storage system, conventional steam generators and a cogeneration process into two water treatment plants, a reverse osmosis plant (RO) and a multiple-effect distillation plant (MED).

Flowback/Produced Water of Shale Gas Play
In order to supply a specific amount of flow-back and produced water (FPW) from a shale play to a desalination plant, the calculation of an FPW flow average for many years is an appropriate option to avoid the uncertainty in the amount of FPW.Specifically, we know that wastewater of shale play is typically subjected to heavy regulation and should be stored in containers so that these containers can be utilized to get a constant flow approximately.Additionally, a large number of wells in a shale play can contribute to making the flow rate of FPW approximately constant because when the FPW production of one well starts declining, another well will start its production and compensate a drop of production in other wells.
The value of flowback and produced water returned from shale gas formations to the surface in the Eagle Ford Basin is estimated to be 151.22 × 10 6 m 3 [49] for 10 plays since the early 2000s until 2015.Table 2 summarizes the costs of RO and MED.Additional data can be obtained from the literature [50][51][52].The techno-economic data for RO and MED are reported in Table 1.

Solar Energy
The solar data are summarized in Appendix A. Table 2 summarizes the main cost data for the solar collectors.The total fixed capital cost of the solar field ($) is the sum of the heat collection element (HCE), mirror, support structure, drive, piping, civil work, structures and improvements, as follows: where C SF is the solar field cost per area unit ($241/m 2 ) and A SF is the solar field aperture area (m 2 ).The thermal storage system is assumed to be an indirect two-tank type, which uses the binary solar salt (sodium and potassium nitrate) as a storage material with the following fixed capital cost estimation ($): where C TES is the thermal storage system cost per thermal energy unit ($27.18/kWh),SC is the number of storage capacity hours (h) and Q solar f ield→ f inal demand is the useful thermal power produced by the solar field (kW).
The fixed capital cost estimation of a steam generator system ($) is calculated as: where C SG is the steam generator system cost per thermal power unit ($/kW t ).
The fixed capital cost of a boiler ($), which is assumed to a water-tube boiler fueled with gas or oil, is estimated as follows [44]: where Q Boiler is the amount of thermal power (BTU/h) transferred to the steam and equal to (Q Boiler /η boiler ), η boiler is the efficiency of a boiler and N P is a factor to account for the operation pressure, and it is given by: N P = 7 × 10 −4 •P g + 0.6; P g is the gauge pressure (psi) of a boiler; N T is a factor accounting for the superheat temperature and is given by: N T = 1.5 T in is the temperature at the inlet of a turbine; T in sat is the saturation temperature at the inlet of a turbine.
The fixed capital cost of a turbine ($), which is assumed to be a non-condensing turbine, is estimated as follows [44]: where E T is the turbine shaft power output (BTU/h); E ,T = m• h in − h out act .

Flared Gas
The shale gas production from the Eagle Ford wells can be used as a fuel for the cogeneration process.Furthermore, the flared gas can be used also as a fuel source for the cogeneration process as it will contribute to saving a considerable amount of shale gas along with diminishing CO 2 emissions accompanying the flared gas.In the Eagle Ford fields, 4.4 billion cubic feet of gas were flared in 2013, which represented around 13% of the gas in the formation [55].

Total Cost
The annual fixed cost (AFC) ($/year) of the system is determined as follows: The operation and maintenance cost ($/h) of the solar field, cogeneration process, thermal storage system, administration and operations is estimated as follows, based on data given by [53,54]: where C OM is the operation and maintenance cost per thermal power unit ($0.0203/kWh).
The type and amount of the selected fuel are necessary to estimate the cost of fuel ($/h), and it is formulated as follows: where C F is the fuel cost ($/MMBTU), Q B is the amount of thermal power (BTU/h) that equals (Q Boiler /η boiler ) and η boiler is the efficiency of a boiler.The annual operating cost (AOC) ($/year) is determined as follows: where a Y is the annual operation time (h/year).
The annual income ($/year) is the sum of the total desalinated water production value and the savings value of a reduction in the cost of transportation, fresh water acquisition and disposal: where C FW is the fresh water cost per volume unit (0.24$/bbl), C DS is the disposal cost per volume unit (0.05$/bbl) and C TR is the transportation cost per volume unit (0.89$/bbl).
The net profit represents the sum of the total desalinated water production value and the saving value of a reduction in the cost of transportation, fresh water acquisition and disposal.The treatment process of flowback and produced water in a shale gas site can contribute effectively to saving money for each barrel of flowback and produced water that should be transported by truck and disposed.Table 3 shows the cost of transportation, fresh water acquisition, primary/secondary treatment and disposal depending on the characteristics of a water treatment plant with a capacity of 2380 barrels/day in Eagle Ford Basin [56].

Results and Discussion
A detailed performance model of the parabolic trough was applied to the case study to determine the useful thermal power (per unit length of a collector) produced by the solar field.The calculations of the solar field have been carried out depending on the monthly average of hourly direct solar irradiance, hourly ambient temperature and hourly incidence angle.Moreover, the characteristics of the LS-3 collector were adopted, and all types of thermal losses (convection, conduction, radiation) are considered for the entire solar field.The hourly variations in the useful thermal power for 12 months were obtained, as shown in Figure 3.
The obtained results showed that the gained thermal power in the months of January, February, November and December is less than the other eight months of the year due to low DNI and the high cosine effect.However, the four months that have the lowest value of useful thermal power still have significant potential to provide thermal power to the system.Selecting the solar irradiance at around 500 W/m 2 at the design point to calculate the total area of the collectors can give a great chance for these four months to contribute efficiently to supplying sufficient thermal power, despite a low value of average direct normal irradiance in the region selected as a case study.In the same direction, the eight months that have a higher DNI can be exploited to provide direct thermal power to MED and surplus thermal power to a thermal storage system.Indeed, the optimal area of collectors and storage system capacity are based on the minimum total annual cost of the entire system that can be obtained through an optimization solution.
The monthly distribution of the optimal thermal power mix for the MED plant and the entire system has been determined for the different percentage contributions of RO and MED in the total desalinated water production.The optimal thermal power mix for the MED plant includes the direct thermal power of the solar field, the indirect thermal power of the thermal storage system, the surplus thermal power of the cogeneration system and the direct thermal power from the combustion of fossil fuels.The monthly distribution varies over the year due to the availability of DNI and the variability of the incident angle, as shown in Figures 4-6.
The solution of the case study introduces two scenarios to the optimal operation for MED in accordance with the availability of solar energy regardless of the percentage contribution of MED.The first scenario is for the months of January, February, November and December and shows that it favors the harnessing of direct solar thermal power during the diurnal hours and utilizing fossil fuel in the early hours of the day and in the evening.However, stored solar thermal power can be contributed from 1-2 h only because of the lack of solar energy in these months, as illustrated in Figure 7, adapted from [57].
The second scenario is for the months of April, March, May, June, July, August, December and October and shows sharply diminishing fossil fuel use up to 2 h only.Typically, direct solar thermal power is exploited in the middle of the day, while stored solar thermal power is dispatched in the early hours and in the evening, as shown in Figure 8, adapted from [43].In future work, the previous two scenarios can be applied to the entire system in the case of integrating solar energy into cogeneration process.The obtained results showed that the gained thermal power in the months of January, February, November and December is less than the other eight months of the year due to low DNI and the high cosine effect.However, the four months that have the lowest value of useful thermal power still have significant potential to provide thermal power to the system.Selecting the solar irradiance at around 500 W m ⁄ at the design point to calculate the total area of the collectors can give a great chance for these four months to contribute efficiently to supplying sufficient thermal power, despite a low value of average direct normal irradiance in the region selected as a case study.In the same direction, the eight months that have a higher DNI can be exploited to provide direct thermal power to MED and surplus thermal power to a thermal storage system.Indeed, the optimal area of collectors and storage system capacity are based on the minimum total annual cost of the entire system that can be obtained through an optimization solution.
The monthly distribution of the optimal thermal power mix for the MED plant and the entire system has been determined for the different percentage contributions of RO and MED in the total desalinated water production.The optimal thermal power mix for the MED plant includes the direct thermal power of the solar field, the indirect thermal power of the thermal storage system, the surplus thermal power of the cogeneration system and the direct thermal power from the combustion of fossil fuels.The monthly distribution varies over the year due to the availability of DNI and the variability of the incident angle, as shown in Figures 4-6.
The solution of the case study introduces two scenarios to the optimal operation for MED in accordance with the availability of solar energy regardless of the percentage contribution of MED.The first scenario is for the months of January, February, November and December and shows that it favors the harnessing of direct solar thermal power during the diurnal hours and utilizing fossil fuel in the early hours of the day and in the evening.However, stored solar thermal power can be contributed from 1-2 h only because of the lack of solar energy in these months, as illustrated in Figure 7, adapted from [57].direction, the eight months that have a higher DNI can be exploited to provide direct thermal power to MED and surplus thermal power to a thermal storage system.Indeed, the optimal area of collectors and storage system capacity are based on the minimum total annual cost of the entire system that can be obtained through an optimization solution.
The monthly distribution of the optimal thermal power mix for the MED plant and the entire system has been determined for the different percentage contributions of RO and MED in the total desalinated water production.The optimal thermal power mix for the MED plant includes the direct thermal power of the solar field, the indirect thermal power of the thermal storage system, the surplus thermal power of the cogeneration system and the direct thermal power from the combustion of fossil fuels.The monthly distribution varies over the year due to the availability of DNI and the variability of the incident angle, as shown in Figures 4-6.
The solution of the case study introduces two scenarios to the optimal operation for MED in accordance with the availability of solar energy regardless of the percentage contribution of MED.The first scenario is for the months of January, February, November and December and shows that it favors the harnessing of direct solar thermal power during the diurnal hours and utilizing fossil fuel in the early hours of the day and in the evening.However, stored solar thermal power can be contributed from 1-2 h only because of the lack of solar energy in these months, as illustrated in Figure 7, adapted from [57].The second scenario is for the months of April, March, May, June, July, August, December and October and shows sharply diminishing fossil fuel use up to 2 h only.Typically, direct solar thermal power is exploited in the middle of the day, while stored solar thermal power is dispatched in the early hours and in the evening, as shown in Figure 8, adapted from [43].In future work, the previous two scenarios can be applied to the entire system in the case of integrating solar energy into cogeneration process.The second scenario is for the months of April, March, May, June, July, August, December and October and shows sharply diminishing fossil fuel use up to 2 h only.Typically, direct solar thermal power is exploited in the middle of the day, while stored solar thermal power is dispatched in the early hours and in the evening, as shown in Figure 8, adapted from [43].In future work, the previous two scenarios can be applied to the entire system in the case of integrating solar energy into cogeneration process.It is observed that the total annual cost of the system as mentioned in the previous section can be reduced by increasing the percentage contribution of RO over MED, but it requires consuming a great amount of fossil fuel.More consumption of fossil fuel causes serious environmental impacts due to emitting a massive amount of CO .From the case study, sustaining fossil fuel resources and diminishing the emissions of greenhouse gas require enhancing the percentage contribution of MED in the system based on solar energy as a provider for a high percentage of the thermal power.Figure 9 offers an obvious comparison between the economic and environmental aspects of the system through the different percentage contributions of RO and MED in the total desalinated water It is observed that the total annual cost of the system as mentioned in the previous section can be reduced by increasing the percentage contribution of RO over MED, but it requires consuming a great amount of fossil fuel.More consumption of fossil fuel causes serious environmental impacts due to emitting a massive amount of CO 2 .From the case study, sustaining fossil fuel resources and diminishing the emissions of greenhouse gas require enhancing the percentage contribution of MED in the system based on solar energy as a provider for a high percentage of the thermal power.Figure 9 offers an obvious comparison between the economic and environmental aspects of the system through the different percentage contributions of RO and MED in the total desalinated water production.Reconciliation of economic and environmental objectives can be achieved using a sustainability weighted return on investment calculation [47,48].It is observed that the total annual cost of the system as mentioned in the previous section can be reduced by increasing the percentage contribution of RO over MED, but it requires consuming a great amount of fossil fuel.More consumption of fossil fuel causes serious environmental impacts due to emitting a massive amount of CO .From the case study, sustaining fossil fuel resources and diminishing the emissions of greenhouse gas require enhancing the percentage contribution of MED in the system based on solar energy as a provider for a high percentage of the thermal power.Figure 9 offers an obvious comparison between the economic and environmental aspects of the system through the different percentage contributions of RO and MED in the total desalinated water production.Reconciliation of economic and environmental objectives can be achieved using a sustainability weighted return on investment calculation [47,48].The case study shows that in the Eagle Ford fields, 4.4 billion cubic feet of gas were flared in 2013, which represented around 13% of the gas in the formation [55].Therefore, this significant amount of flared gas can be exploited as a major source of energy for the system or sharing shale gas in a specific percentage as a minor source of energy, and the results of the different percentage contribution of flared gas are shown in Table 4.The case study shows that in the Eagle Ford fields, 4.4 billion cubic feet of gas were flared in 2013, which represented around 13% of the gas in the formation [55].Therefore, this significant amount of flared gas can be exploited as a major source of energy for the system or sharing shale gas in a specific percentage as a minor source of energy, and the results of the different percentage contribution of flared gas are shown in Table 4.

Conclusions
A water-energy nexus framework has been used to address water management in shale gas production.The following key elements have been integrated: solar energy, fossil fuel, cogeneration process, MED and RO.A hierarchical approach and a multi-period MINLP have been developed and solved to find the optimal mix of solar energy, thermal storage and fossil fuel and the optimal usage of water treatment technologies.A case study for Eagle Ford Basin in Texas has been solved to show the applicability of the proposed approach.The system has been analyzed according to the technical, economic and environmental aspects.The multi-period method has been applied to discretize the operational period to track the diurnal fluctuations of solar energy.The percentage utilization of water treatment technologies has been iteratively discretized.Once the solution of the mixed integer nonlinear program (MINLP) was applied to each discretization, the optimal mix of solar energy, thermal storage and fossil fuel, the optimal values of the design and operating variables of the system (e.g., minimum area of a solar collector, maximum capacity of the thermal storage system, etc.) have been determined.The results show the system's economic and environmental merits using a water-energy nexus framework and enabling effective water management strategies while incorporating renewable energy.
Author Contributions: This paper is a collaborative research between the two authors.The general problem definition, methodology, optimization approach, and solution method were developed via discussions between the two authors.Al-Aboosi carried out the computational aspects of the optimization program and the techno-economic analysis for the case study under the supervision of El-Halwagi.Both authors contributed to writing and editing of the manuscript.

Figure 3 .
Figure 3. Monthly average of hourly direct normal irradiance (DNI) and useful thermal power.

Figure 4 .
Figure 4. Optimal thermal power mix for MED plant and the entire system with 30% RO 70% MED.

Figure 3 .
Figure 3. Monthly average of hourly direct normal irradiance (DNI) and useful thermal power.

Figure 4 .
Figure 4. Optimal thermal power mix for MED plant and the entire system with 30% RO 70% MED.Figure 4. Optimal thermal power mix for MED plant and the entire system with 30% RO 70% MED.

Figure 4 .
Figure 4. Optimal thermal power mix for MED plant and the entire system with 30% RO 70% MED.Figure 4. Optimal thermal power mix for MED plant and the entire system with 30% RO 70% MED.Processes 2018, 6, x FOR PEER REVIEW 13 of 25

Figure 5 .
Figure 5. Optimal thermal power mix for the MED plant and the entire system with 60% RO 40% MED.

Figure 6 .
Figure 6.Optimal thermal power mix for the MED plant and the entire system with 80% RO 20% MED.

Figure 5 .
Figure 5. Optimal thermal power mix for the MED plant and the entire system with 60% RO 40% MED.

Figure 5 .
Figure 5. Optimal thermal power mix for the MED plant and the entire system with 60% RO 40% MED.

Figure 6 .
Figure 6.Optimal thermal power mix for the MED plant and the entire system with 80% RO 20% MED.

Figure 7 .
Figure 7. Optimal operation for MED during January, February, November and December.

Figure 6 .
Figure 6.Optimal thermal power mix for the MED plant and the entire system with 80% RO 20% MED.

Figure 5 .
Figure 5. Optimal thermal power mix for the MED plant and the entire system with 60% RO 40% MED.

Figure 6 .
Figure 6.Optimal thermal power mix for the MED plant and the entire system with 80% RO 20% MED.

Figure 7 .
Figure 7. Optimal operation for MED during January, February, November and December.

Figure 7 .
Figure 7. Optimal operation for MED during January, February, November and December.Processes 2018, 6, x FOR PEER REVIEW 14 of 25

Figure 8 .
Figure 8. Optimal operation for MED during April, March, May, June, July, August, December and October.

Figure 8 .
Figure 8. Optimal operation for MED during April, March, May, June, July, August, December and October.

Figure 8 .
Figure 8. Optimal operation for MED during April, March, May, June, July, August, December and October.

Figure 9 .
Figure 9.Comparison between the economic and environmental aspects.

Figure 9 .
Figure 9.Comparison between the economic and environmental aspects.

Table 3 .
Cost of transportation, fresh water, treatment and disposal of FPW.

Table 4 .
Technical and economic results for the system.The percentage contribution of RO and MED plants in the total desalinated water production; ** the percentage contribution of flared gas as a source of energy. *

Table A2 .
Interest:The authors declare no conflict of interest.Average hourly wet bulb temperature ( • C).