Developing an integrated model for allocating resources and assessing technologies based on the watergy optimal point (water-energy nexus), case study: a greenhouse

Water-energy nexus approach analyses water and energy interactions to provide sustainable usage of resources. This study incorporates a comprehensive bottom-up optimization model to assess the combination of technologies based on the water-energy nexus (watergy) optimal point. To achieve this goal, the watergy reference system is introduced according to six principles of watergy system. In this study, a new method is developed by adding an integration layer to the optimizing model with the objective function of the minimum total cost. In this layer, the demands for water and energy, for supplying the water and energy services, are calculated endogenously. A sensitivity analysis is performed by presenting six scenarios for greenhouse case study. Results indicate that the drainage recycling, combined heat and power, and photovoltaic were chosen at the watergy optimal point. Compared to the base case scenario, the maximum achievable reduction in the total cost of production is 31% in the most costeffective scenario (Scenario B). Also, among the modelled scenarios, the optimal combination of technologies could result in reducing the use of water, electricity, and fertilizer by 18%, 31%, and 25% respectively.


INTRODUCTION
The United Nation (UN) has predicted the world's population to reach 9.7 billion by 2050 [1]. The rapid population growth joints with the global economic development and will accelerate the depletion of water and energy resources and the growth of the food demand. As a result, the human society must now make efforts to resolve such complex interdepended challenges that are characterized as fundamental threats to the human civilization and are directly related to the areas of the production, distribution, and use of energy, water, and food [2]. Currently, agriculture (as a food production sector) accounts for more than 70% of total global freshwater withdrawals, meanwhile, the agricultural productions and supply chains are responsible for about 30% of the total energy consumed globally [3]. Consequently, to have sustainable foods, the human requires to produce food more efficiently and consume less water and energy [4]. A solution to the water problem manifested itself in the water demand management and the changes in the agricultural and food production systems [5]. An innovative optimal solution to challenges of the food production can be identified when the water and energy nexus and the least required capital are considered. Although the application of technologies and processes can overcome the challenges of the water scarcity, the substitution of water and material with capital and energy cannot be avoided. The identification of sustainable linkage between water, energy, and capital is of the utmost importance to establish a process of a sustainable production [6]. To show the interrelationship between production factors, an integrated approach is required [7]. Hence, the term watergy has been introduced. Watergy indicates the integration of water and energy in an optimization process [8]. This term was applied in different projects in Europe and the United State of America to examine the potentials of saving on water and energy [9,10].
Another approach addressed the water-energy nexus modelling. However, it was shown that the water-energy nexus analysis could provide the appropriate means for planning and identifying potential policies and the technology development [11]. Die et al. [12] reviewed such WEN (water-energy nexus) models on the macro-level as WEAP-LEAP (Water Evaluation And Planning system and Long Range Energy Alternatives Planning), TIAM-FR (TIMES Integrated Assessment Model), CLEW (Climate, Land, Energy and water), UWOT (Urban Water Optioneering Tool), WEEN (water, energy, and emission nexus), SPATNEX-WE (SPAtial and Temporal NEXus-Water Energy), GLEW (Great Lakes Energy Water model), WESTWeb (Water-Energy Sustainability Tool Web), etc., although some research at the micro-level was addressed. One of them was the research on greenhouses. The agricultural production system was shifted to a more protected cultivation with the help of greenhouses with the capability of increasing crop yields and decreasing the water consumption [13]. The less water consumption and the cultivation throughout the year are merits of the greenhouse cultivation that can provide appropriate means for establishing a sustainable agriculture [14]. The greenhouse is one of the most energy-intensive and cost-intensive sectors in the horticulture industry due to the use of various technologies [15 -18]. The water and energy analysis in the greenhouse has been based usually on maintaining an appropriate operational mode where the microclimate condition inside the greenhouse is fixed at a set point. Analytical tools based on microclimate conditions are focused on the technology assessment [19], [20]. Vanthoor et al. [21] introduced an economic greenhouse model to scrutinize the greenhouse design based on a range of climate changes and economic circumstances. Vadiee et al. [22] studied different models of the energy supply and management systems in closed greenhouses. Speetjens et al. [23] also used a morphological diagram to study the optimal configuration of the greenhouse technology for a region in Taiwan. Table 1 summarizes the most important water and energy models and studies.
Based on water-energy nexus studies, the researchers have increasingly begun the investigations in the areas of minimizing the water consumption [11], minimizing the energy consumption [24,25], and minimizing the economic costs [26]. Technology has played an essential role as the confluence point of water and energy flows in the nexus analysis [27]. The system analysis methods and life cycle analysis (LCA) have been successfully used to simulate the process of the complex industrial and greenhouse systems [28,29]. In the agriculture section, despite the importance of the greenhouses in utilizing water and energy resources as well as the role of investments in their economy, in general, in almost none of the previous research works comprehensive studies were done involving the mix of water, energy and technology along with the supply of watergy services with the objective function of minimizing  [30,37] Included in the set of modules to estimate the effect of climate changes on the water resource management model for allocating water and energy resources (MIT) * * * * IGSM-WRS Global Integrated Model of the water resource system Strzepek, chlosser,Gueneau, Gao, Blanc, Bilhuda, Jacoby, Sokolov, Schlosser, Dutkiewicz, Paltsev., et al (2012), [38,39] The process system analysis method connecting the input to demand based on the life cycle sustainability analysis of the W-E-F Almeria´s tomato supply chains and greenhouse production. * * * Energy, water, food nexus (E-W-F model) Irabien, Darton, (2016), [40] The Water-Energy and Emission Nexus model for the steel-making plant analysis that shows the optimal combination of technologies to decrease the consumption of resources and reduce the CO2 emission * * * * * WEEN Wang, C., et al., (2017), [41] The energy management in the closed greenhouse, the optimal combination of technologies, analyses the integration between Thermal Energy Storage (TES) and the closed greenhouse * * * * Closed greenhouse concept Vadiee, A. and V. Martin, (2012-2014), [22,42] The combination of technologies for the zero-fossil energy consumption in greenhouses * * * * Zero fossil energy greenhouse Vant Ooster, A., et al., (2007), [43] The optimal combination of greenhouse technologies for a region in Taiwan [7,9,[33][34][35][36] Analysis in the municipal water supply and wastewater treatment systems, (The alliance to save energy international program)

Figure
A. 1 shows a scheme of the overall watergy system that contains two water (B) and energy (A) subsystems and their overlapping, interaction and common space (C; watergy). The conceptual model based on the watergy concept indicates that energy is flowing in the energy subsystem (A), and water is flowing in the water subsystem (B). Two subsystems are the integral part of the overall watergy system.

Watergy system
In the present research, in order to define the concept of the water-energy nexus, the paradigm of the watergy system, based on the previous studies such as the watergy project and watergy greenhouse [33,34,45,46] as well as the expression of the water-energy nexus in macro models [12,[30][31][32] and micro models [41] has been presented. In this research, the comprehensive form of this water and energy overlap (water-energy nexus) has been taken into account as watergy, and the general integrated system, comprehensively considering the two water and energy subsystems and their interaction (watergy), is called the watergy system. The watergy has different forms that indicate the complementary and competitive relationships between water and energy. Water is used for facilitating the energy flow and introducing negentropy (reverse entropy † ) into the cycle. Energy flows facilitate the flow of water and enhance the potential for changes in the production processes. The interlinkages between water and energy flows in a system can be based on the comprehensiveness of processes and causeeffect relationships. It is, therefore, intended to present principles based on a review of previous works that provide a foundation for developing an analytical tool. According to the developed literature, six principles have been presented as follows.
(1) For Necessary relationship: two streams of water and energy are flowing in the watergy system and through different technologies to fulfil the operation of the system [12]. (2) Energy for water and water for energy: this concept was originally presented by Gleick in 1990 [47]. It was then applied as the linkage between water and energy [41]. (3) Direct relationship: in some watergy technologies, more water is consumed to increase the system capacity which again leads to an increased energy consumption (or vice versa) [44]. (4) Substitution between water and energy: water and energy can be substitutes for each other in a watergy system [30]. (5) Complementation of water and energy: the optimization of the energy flow could result in saving water and vice versa [46]. (6) Water and energy interaction in the final layer for supplying watergy services: in the last layer of the system, of which the output is water and energy services, both water and energy are flowing [48].
Although there are overlaps between principles, these principles provide an appropriate means of developing a conceptual model that would be the basis for the formulation of the mathematical model representing the interaction between water and energy flows.

Conceptual model (WERS)
The Reference Energy System (RES) depicts only single energy flows from resources through the process, conversion, and other layers to meet the energy demand [49]. In contrast, the Watergy Reference System (WERS) has been developed to depict the integrated water and energy flow. WERS illustrates the interactions between the water and energy flows, technologies, and system components together with the output in the system. The case study of this research is a greenhouse. WERS for the greenhouse is shown in Figure 1. WERS consists of several layers (the resources, process, conversion and treatment, distribution, and integrated layer with recycling) for supplying watergy services. The proposed method for integrating the water and energy demands for watergy services being supplied (e.g., Rose product) is different from the previously developed methods (such as the CLEW model) that define individual demands for water and energy in the demand layer. System components have been identified as control volumes (CV) that could represent one or a bundle of alternative technologies. In the WERS, alternative technologies are identified by a box in each section of the greenhouse. The concept of Control Volume (CV) has been used as an open system [49] to show the input and output flows in the system. The WERS includes two subsystems that have been indicated by two background colours (yellow for the energy and blue for the water subsystems). The outflow from each control volume represents a specific quality of water or energy. If the water quality changes in the CV, the CV will be part of the water sub-system. If the transformation of the energy carrier occurs in that CV, it will be identified as a flow in the energy subsystem. The recycling has also been included to reflect the retrieval of the drainage in the WERS diagram. The WERS of the greenhouse in the present case study considers watergy services (cut flowers of rose) in the output layer. Therefore, the proposed method couples the demands for water and energy to create endogenous synergies among the water and energy subsystems.

Mathematical model for the watergy system
The Mathematical Programming (MP) has been applied to implement the conceptual model. The mass and energy balances that connect different layers of the watergy system are attained using the bottom-up technology-based optimization model of ESM model (historical background of ESM is described in Appendix C) [50,51]. The objective function is the total costs of the system which includes the cost of water and energy resources together with the features of the technology. The novelty of the present study is having added the coefficients of the water demand and energy demand to optimally supply watergy services to a set of the constraints of the model related to the product type (resulted watergy services). This novelty is the result of endogenously considering the water demand and energy demand in the integration layer.
Watergy supply framework. In this study, a new method is developed by adding an integration layer to the optimizing model with the objective function of the minimum total cost. In this layer, the demands for water and energy, for supplying the water and energy services, are endogenously calculated based on the considered equations related to the model according to the considered product of the system. Therefore, the total costs of capital, operation and maintenance, and resources form the main criterion for identifying the optimal configuration of the system for supplying services (the product). The end product has been assumed to be roses as the product of the greenhouse case study in the developed model. It is called "Watergy in Greenhouse Modelling for Analysis (WEGMA-1) ". The model also includes water recycling technologies and the use of renewable energy resources (solar energy in this study was only considered) in the surrounding of the greenhouse. Hence, the interaction of the system with its environment, which enables an analysis of the impact of renewable resources on the sustainable production of food, has been considered. Figure 2 shows the steps of the proposed method for developing integrated model of water and energy system and the watergy optimality. This figure shows the structure of the relationships between the equations governing the integrated water and energy model. This procedure has 5 main steps. Drawing a Watergy Reference System (WERS) as a conceptual model is the first step. In the second step, the data of the desired system are collected based on the WERS. This data is used to calculate coefficients related to technologies and system demand as well as model validation. The third section shows the structure of the mathematical model. Mathematical constraints are modelled in this section. These relations were divided into three levels. The first level includes the equations of resources, the capacity of technologies, and the equations of process and conversion. The second level is the integration layer (which is an innovation of the present study that has been added to make the connection between water and energy flows with different rates). The third level is coefficients related to watergy service (product). The fourth step is the definition of the scenarios and finally, the fifth step is the model optimization based on the total cost minimization objective function in different scenarios.

Model formulation
To reflect the efficient use of resources and consider a total of water and energy subsystems to supply sustainable watergy services, the objective function is the minimum total cost. The total cost function, as represented by Eq. (1), is the sum of the present value of the investment ( ̅ ), operation and maintenance ( & ̅̅̅̅̅̅̅ ), costs of resources ( ̅ ) including energy, water and material, and externalities ( ̅ ). Externality is a cost or benefit caused beside a production [52]. In the greenhouse model, emissions from combustion gas and sewage result in externalities of the system. However, considering the national environmental regulations, these externalities are considered zero in this case study. The cost data for various greenhouse technologies are given in Appendix B (Table B. 1).
The constraints of the model are introduced below: 1-Watergy services constraint Watergy services are considered as the end product of the system which should be supplied by the system. Eq. (2) sets the watergy service into the model.
where F in Eq. (2) is the consumption of the input flow of the energy/water (product demand) of k to the technology of τ for producing the watergy service (system production) of j in the time of t. U is the value of the watergy service of j and is the seasonal share of the service of j. is the efficiency function of converting inputs to the final output in the greenhouse system.
2-Demand coefficients for water and energy: The equations for calculating the demand coefficients in the integration layer depend on the case study system. Based on the WERS of the greenhouse case study (Figure 1) heating (the air temperature), cooling (the air flow and temperature, and humidity) and irrigation/fertigation are the main demands for the crop production. The heating demand coefficient in cold seasons in the inner integrated layer of the model is represented by Eq. (3) [53].
In Eq. (3) the heat demand of Q, estimated by the overall heat transfer coefficient of u, and the surface of the greenhouse cover of per the greenhouse floor area of , the design value of the inside temperature of , mean temperature increase at night by heat storage in the floor soil and bulk from the day time of , the mean night temperature of , (Appendix E shows the recorded outdoor temperatures of the greenhouse, which is the basis for calculating the average night temperature tmn, for two months of the year), number of night hours of , and is the number of days in cold months. The air flow for the ventilation and cooling demand coefficient in the hot season is provided by the NGMA (National Greenhouse Manufacturing Associations) report from Eq. (4).
In this equation, AF stands for the air flow, L represents the greenhouse length, and W represents the greenhouse width.
is the elevation factor, ℎ shows the light intensity factor, and indicates the factor of the temperature increase at a distance. The coefficient of the yearly water necessary for the humidity demand coefficient for a greenhouse is estimated by Eq. (5) Where Gχ is the value of the water needed to be injected into or rejected from the greenhouse for maintaining the desired water content in the greenhouse atmosphere, E is the crop transpiration rate (Eq. (5)), V is the moisture loss through ventilation and C is the condensation on the indoor greenhouse cover (Eq. (5)). The evapotranspiration of plants is another main factor that has enabled the estimation of the water demand coefficient by the plant [53]. Eq. (6) indicates the amount of the plant's water requirement with CWR.
represents the crop coefficient, 0 stands for the amount of the reference evapotranspiration (the FAO-Penman-Monteith equation), is the loss factor for irrigation, and shows the crop-covered area to the greenhouse floor area. The water requirements of roses were 700 ml and 400 ml per plant in a day in the hot and cold seasons respectively, on the irrigation schedule in the pilot greenhouse. An important aspect of the model has been the addition of the integrated CV, forming the confluence of water and energy flows for supplying watergy services. This model integrates the two water and energy subsystems according to the water and energy demands of the case of the production of roses, i.e. heating, cooling, irrigation, and so on. This feature is based on the sixth principle of the watergy system principles. Eqs. (3-6) changes according to the demands of the production type in other cases than the greenhouse.

3-Capacity constraint:
Where the capacity of technologies is available, the amount of flow through technologies in each of the defined layers can be attained. For illustrating the capacity limitation in the model, Eq. (7) has been used.
In this equation, Y shows the new capacity of technology of τ for converting energy/water of k to j in the seasonal zone of l. H is the historical technology capacity and PF is the plant factor.
4-Equations of process and conversion units (Water and energy balance in each technology): For energy/water, the input and output relationship in technologies is presented based on the principle of the conservation of energy (first law of thermodynamic)/mass (Eq. (8)). The relations of technologies and the CVs are considered in different layers according to Eq (8). This constraint is extended to all middle layers and CVs in the WEGMA-1 model.
Where P is energy/water flow from the input energy/water resource of f to the technology of τ for the production of the energy/water of o in the time of t. ɳ is the efficiency of the technology of τ and A represents the input energy/water flow of o to the level where the output technology for the production of e in the time of t in the greenhouse.
5-Equations representing the recycling process: One of the most effective ways to reduce the water consumption is to recycle drainage in irrigation systems and reuse it in greenhouses. Conrad [54] explains the recycling procedure in detail. Yearly recycling in the WEGMA-1 model is considered as an independent layer and Eqs. (9 and 10) describe the governing recycling relationship.
Eq. (9) shows the share of the produced wastewater in the technology of τ in the time of t, while it can be treated and recycled. The sewage water ( ) in the greenhouse (Eq. (9)) either represents a by-product of the technology transferred to wastewater treatment plants or gets discharged into the environment as a pollutant.
is the product of the flow of n in the technology of τ from the flow of l at the time of t.
is the coefficient of the wastewater of r produced from the conversion of the flow of l to the flow of n in the technology at the time of t. ø is the input flow of l from the technology of ø to the technology of τ at the time of t.
6-Use of water and energy resources: The water/energy flow in the process and conversion technologies originate from various resources of water/energy. In Eq. (11), WE shows the flow of o from the water/energy resource of f in the time of t. P indicates the input water/energy of o to the technology from the resource of f.
In addition to the various energy resources such as gas, electricity, diesel fuel, and solar energy, the water flows with various qualities are also considered. The solution strategy and brief schematic of the model process algorithm are demonstrated in Appendix D ( Figure D. 1).

Case study: introduction of the pilot greenhouse
The model has been applied to study the optimal point of the watergy performance in a greenhouse case study. The selected case is a commercial hydroponic greenhouse, called Nikan (0.5 ha) and located at Tankaman village in Alborz province (38.9168°N, 45.5692°E) in Iran, which is a multi-span gothic type greenhouse with a plastic cover. The physical features of the pilot plant, related to a one-year cultivation having started in September 2018 and ended in August 2019, are presented in Table 2. The product is the rose flower and the average rose yield for hot and cold seasons were 160 and 80 cut flowers.m -2 .yr -1 respectively. The data for the water, electricity, and gas consumption were measured during the period of cultivation in the greenhouse.

Model verification and validation
The method of the sensitivity analysis of boundary conditions has been used to verify the functions of the model (Presented in Appendix F). To validate the model, comparing the results of the model with those of the empirical values is the most reliable way. The model was run with the supplied quantities of water and energy using the current pilot technologies (Nikan greenhouse). Table 3 Table 3, the Absolute Relative Error (ARE) is quite low which indicates the validity of the model based on empirical data. Developing an integrated decision support model for ...
Year XXXX Volume X, Issue Y, 1100416

Model application
The greenhouse owner intends to construct a new greenhouse (0.5 ha) in addition to the old one. The expansion of the greenhouse capacity is assumed to be based on the optimal combination of technologies according to the watergy optimal point. Such an expansion plan is motivated by policies on the greenhouse production in Iran which supports the increase of the greenhouse cultivation from 14,000 hectares to more than 48,000 hectares in a 10-year time horizon (2018-2028) (Iran's Sixth and Seventh National Development Plan). The design of the extension of the greenhouse capacity has been studied with the sensitivity analysis of the WEGMA-1 model. Table 4 shows the resources and technologies that have been included in the set of data. The product (watergy services) in the new greenhouse was assumed to be 7,250,000 cut flowers. yr -1 for a 0.5-ha greenhouse (a constant yield of production is considered in the sensitivity analysis). Also, in the humidifier technology, to prevent sedimentation on fogger nozzles, a RO desalination (in treatment CV) included along with the fogger system. The total implementation time period of the model is 15 years, and each period of the model run is 5 years. Although technologies can have different lifespans, the life-time of all of the technologies are assumed 20 years in this research work. These conditions are the same for all technologies in all scenarios so as not to affect the modelling goal. Also, it is assumed that the technical performance of the installed technologies will not degrade during their utilization at the cost of annual operational and maintenance services. Six scenarios, which relate to reducing subsidies on water and energy and changes in the prices of fertilizers, have been considered for sensitivity analysis. The results obtained in each scenario have been compared with the base case. Base case is a combination of technologies that exist in the actual greenhouse and is not optimal in the current situation. But BAU (Business-as-Usual), which is scenario A, is the optimal combination of technologies to continue the current boundary conditions that exist in the Base Case. The modelled scenarios at different boundary conditions are explained in the following paragraphs:

System assumptions and the scenarios definition for sensitivity analysis
Impact of the price of fertilizer. The first scenario is identified as scenario A, which represents the business as usual. The prices of energies are subsidized and they are 0.25 Ȼ. kWh -1 for electricity, 0.75 Ȼ.m -3 for natural gas, 1.7 Ȼ.lit -1 for diesel oil, but solar, and water resources are considered free due to current unlimited resources.
Scenario B has been presented to examine the impact of the price of fertilizer assuming that other conditions are constant and similar to those of scenario A. The price of fertilizer has been reduced by 90% and an abundance of water resources has been assumed.
Reducing subsidies on energy prices. Scenario C presents the reduction of energy subsidies and the increase of electricity price to 6 Ȼ. kWh -1 (the price of electricity in the low capacity solar PV in Iran) while other conditions are considered as the same as in scenario A.
In scenario D the subsidies on gas and diesel are reduced in addition to an increase in the price of electricity. Prices of gas and diesel oil are assumed to rise to 6 Ȼ.m -3 (This selection is based on the prices of gas feed used in Iran petrochemical industry), and the FOB prices over the planned time horizon, respectively. Impact of the quantitative and qualitative scarcity of water resources. Water scarcity is an important issue in Iran and overcoming this problem has dominated policies on the agricultural sector. In the fifth scenario (E), in addition to reducing subsidies on water, it is assumed that the water shortage shall be conveyed to the consumers through rationing the access to water. Therefore, a limit on the water flow has been included. Scenario E, in addition to all items assumed in scenario D, includes the limitation on the access to water. The Iranian government has a plan to reduce the greenhouse water rights from 0.7 to 0.5 lit.s -1 .ha -1 . In this regard, scenario E is considered to reach a maximum reduction of the water consumption during the mentioned time horizon. CHP generates high efficiency electricity by using heat recovery for supplying hot water as byproduct.

40% Power CHP
A "pad-fan" system uses fans to pull air through evaporative cooling pads. This technique utilizes the cooling effect produced when water evaporates and cools the air as it is pulled through the pad.

75% Pad-Fan Cooling and Humidification
It is a set of nozzles in the greenhouse. it creates the moisture needed by the greenhouse and desirable for plant growth by spraying very small drops (fog) due to highpressure water.

50% Fogger
Using the two cooling technologies together. -Hybrid of fogger and padfan The set of equipment's (includes pipe, pump, valve and tank) supplies nutrition water to the plant. Fertilizer is equipment that makes stable formulation of nutrition water and manages irrigation.

Irrigation system
It is an irrigation system which includes a drainage treatment technologie.
-Close cycle (fertilizer addition to Drainage recycling) Reverse osmosis is a water purification process that uses a partially permeable membrane to separate ions, unwanted molecules and larger particles from drinking water.

Wastewater treatment and disinfection
A disinfection method uses short-wavelength ultraviolet light to kill or inactivate microorganisms -UV The process which converts the low-quality water treated to high-quality in greenhouse.

98% Wastewater treatment and reuse
Consequently, it has been assumed in the sixth scenario, F, that besides the conditions having ruled scenario D, fresh water resources have become out of reach and nonconventional water resources (saline water) would be available in the greenhouse.
The system arrangements in different operation scenarios are examined and defined in Table 5.

RESULTS AND DISCUSSION
Results of the model, in scenario A, indicate that the use of the electricity from the power grid and heating the greenhouse with the help of a boiler are preferred. Moreover, the technology of the pad-fan has been chosen for the cooling system. A drainage recovery system (closed irrigation) has been selected. The first item of the six principles of watergy is observed in the first scenario. Water and energy as the main sources and necessary inputs are supplied to the greenhouse system. In scenario A a 25% reduction in the fertilizer consumption is observed (due to recycling wastewater) compared to the pilot case (Base Case) and 8% and 13% reductions are respectively obtained in the electricity and water consumption at the watery optimal point. Simultaneous savings of water and energy have occurred in the greenhouse system based on the fifth item of the six principles mentioned for the watergy system concept.
Total cost of the combination of technologies in the base case was gained 69,992 $. The total cost of the system reduced by 15% in scenario A compared to the base case. In scenario B, an open irrigation system (without the wastewater recovery system) is selected and the padfan system provided cooling. In scenario B total cost decreases by 31% compared to base case.
In scenario C, with the increased electricity price, in the watergy optimal point, CHP (Combined Heat and Power) is selected. The heat supplied with the help of CHP would cover 7% of the total heat demand. With the increased electricity prices, a fogger replaced the padfans to cool and humidify the greenhouse. Furthermore, the RO (desalination) system was selected to provide the fogger with the solute-free inlet water. Fans consume too much energy in the pad-fan cooling system, and choosing a fogger instead will reduce the greenhouse energy consumption. Due to this replacement, the water consumption of the cooling system in this scenario increased given the use of RO. Ultimately, the power consumption was decreased by 31%, the water consumption was decreased by just 7%, but the gas consumption was increased by 3.5%. Also, the closed irrigation system is preferred to save on fertilizer. Desubsidized electricity price in scenario C results in 5% reduction in the total cost of system, compared to the base case.
The results obtained in scenario D indicate that PV (photovoltaic) and the gas-using boiler is selected. Foggers and the closed irrigation system are chosen similarly to the case in scenario C. The reduction in the power consumption is like in scenario C; however, due to the use of PV instead of CHP, a slight reduction in the water consumption was observed at the watergy optimal point compared to that in scenario C (Figure H .1). the comparison of two scenarios C and D, based on the second of the six principles of watergy, shows that a little more water is used for the CHP cycle (in scenario C) to supply heat and electricity. In scenario D, the increased gas price together with electricity and the use of new energy supply technologies, results in a 17% increase in total costs for the production of greenhouse products compared to the base case.
At the watergy optimal point in scenario E, it is observed that the fogger was replaced with the pad-fan technology, resulting in lesser water consumption in pad-fans than in foggers (along with RO). Furthermore, a closed irrigation system has been used. With the utilization of a decentralized small wastewater treatment system, the residual greenhouse wastewater is also processed and has reached acceptable specifications to be employed in the pad-fan cooling system which leads to a reduced fresh water consumption. The freshwater is replaced with wastewater to supply the non-irrigation water demanded ( Figure 5) in the system. Overall, the largest reduction of up to 18% in the fresh water consumption has been achieved in scenario E. Implementation of the new wastewater treatment technologies together with the increased energy prices results in 21% increase in the total cost of the system in scenario E, as compared with the base case.
In the scenario F, the RO technology is selected for the water desalination. Due to the salinization of water and therefore having selected the RO technology to desalinate all the water entering the greenhouse, the same desalinized water has been used by foggers as well. Hence, in this scenario, the application of foggers instead of pad-fans has been economically justified. The analysis indicates a 19% increase in the electricity consumption compared to the same in scenario D. Using of nonconventional water resource results in a 28% increase in the total cost of scenario F, compared to base case. Figure 3 illustrates the trend of changes in the water and energy consumption as well as other greenhouse inputs in all scenarios. The development of an integrated model of the water-energy nexus with an integrated watergy approach leads to a more comprehensive understanding of the nexus, which is one of the needs to reduce the degradation of these resources. Unlike in other studies, this article has presented the watergy reference system based on the six principles of watergy by studying different forms of the water-energy nexus introduced in previous researches. For instance, Wang et al. [41] surveyed the second principle of watergy in their integrated model of the water-energy nexus, whereas deMonsabert and Liner [46] investigated only the fifth principle. The results related to the greenhouse case study reveal the advantages of an integrated watergy approach towards the water-energy nexus compared to that of a single flow of water or energy. The advantages of this model compared to others are as follow: • The technology combination has been selected by considering the consumption of both water and energy resources, so the effect of energy on the selection of water subsystem technologies, such as treatment and recycling or desalination, has also been analysed.
Whereas previous researchers such as Vadiee et al. [42] and Vant Ooster et al. [43], have provided greenhouse morphology diagram only based on the optimal combination of the resources and technologies of energy. Also, in the energy subsystem, the effect of the water consumption in the composition of technologies has been seen. • Unlike in previous models, such as the TIAM-Fr [30] or CLEW [31] that considered the demand of water and demand of energy separately and as the final layer, in this study considering the integration layer has caused to supply watergy services calculated based on the water demand and energy demand endogenously. • In a previous research, Al-Ismaili [29] presented the thermodynamic simulation of technologies in greenhouses, but did not take into account the optimal technology assessment based on the watergy optimal point. In addition to the merits of the new integrated watergy approach and technology assessment in the present model, the discussion on the analysis the scenarios of the greenhouse case study reveals the following points: a closed irrigation/fertigation system together with the recycling of fertilizer proves to be economical. Castro et al. [55] demonstrated the economics of the metal recycling using the ExLCA (Exergy Life Cycle Analysis) method. With the reduction of subsidies, the power supplied by PV and CHP technologies are selected instead of the grid electricity. The results of the sensitivity analysis of various scenarios show that the installation of pad-fans is more economical than the fogger system in the face of water scarcity when the price of electricity is low. Meanwhile, the reverse osmosis technology (RO with 65% efficiency) are used to ensure the quality of water entering the fogger technology. In previous literatures in the field of the analysis of evaporative systems in greenhouses, different results presented in comparison with these two technologies [56][57][58][59][60]. The reason for the disagreement in previous researches is the lack of the integrated and systematic analysis of water and energy flows, the cost of capital and various related technologies simultaneously for both Pad-Fan and fogger technologies (taking RO into account).
Also, the scenario analysis shows that tackling water resource constraints is possible by using non-conventional water resources and consuming more energy. Figure 5 presents the change of the water consumption with different qualities in different scenarios. Eventually, it is observed that changes in water quality are associated with changes in the technology mix. Figure 5. Contribution of various grades of water qualities in the greenhouse (contains fresh water for irrigation, fresh water for non-irrigation and treated water for irrigation, treated water for nonirrigation (cooling))-Unit: m 3 .yr -1 Fresh water inputs to all scenarios are shown in Figure 5. In Scenario F, since saline water is used as the primary source of water, so it differs from other scenarios.
The comparison of scenarios E and D reveals that the growth of water scarcity, in addition to the selection of the drainage recirculation system, has led to the selection of small-scale wastewater treatment systems for recycling part of the greenhouse wastewater into the cooling section. This has also led to an increase in the electricity consumption. This replacement of water and energy (the growth of energy consumption to supply water from nonconventional sources), which is also based on the fourth item of the six principles of watergy, is emphasized in previous literatures as stated by Dubriel et al [30]. Figure 6, the radar diagram shows a comparison of the relative alternatives of the water-electricity-gas consumption for different scenarios with the base case (considered in the diagram with a value of 100). Figure 6 and Appendix H (Figure H .1 shows the trend of the water and electricity substitution) depict the water and energy substitution in different scenarios based on the fourth principle of watergy.  Figure 6 shows scenarios that water and energy boundary conditions are changed. Six scenarios represent the results of the model based on watergy optimal points for the sensitivity analysis of different boundary conditions. The quantity of rose production as watergy services is constant in scenarios. Results show that the substitution of resources happens beside the change of technologies for supplying watergy services. Above sections presented the results of using watergy approaches in greenhouse case study that reflected six principle of watergy systems. The developed approach is also applicable to other similar watergy case with high interactions among the water and energy systems. Similarly, the developed model may be utilized for other greenhouse products through adjusting the technical coefficients.
The comprehensiveness of the developed watergy approach may be used to provide the optimal watergy point for the efficient use of water and energy resources, simultaneously. However, it should be noted that proper definition of the integration layer (watergy layer) is necessary for using the proposed approach in other systems. In the integration layer of the systems, the demand coefficients must be determined based on the equations and interactions of water and energy flows in the system under study.

CONCLUSION
The interaction between various flows in a system does have a considerable impact on the technology combination and the efficiency of using resources. The scarcity of water resources, a high share of energy, and other main inputs in production costs have necessitated radical changes in the technology mix and the innovation in the system. The trend of changes in systems indicates that the analysis of each flow, independent of its interaction with other flows, shall not be sufficient to understand the mechanism of the process of changes. A review of literatures indicates that in the previous models the focus has been on either water flow or energy flow. And utilizing other resources has been reflected as exogenous parameters in the operational cost of such models. Such approaches can hardly provide an appropriate means for the analysis of changes in the production. Hence, the integrated representation of water, energy, and material in the analytical tools is a step forward which has been the subject of the present research work. This study is fundamentally aimed at providing an integrated watergy model to present a watergy service based on the optimal technology combination and consumption of resources by assessing the watergy optimal point. Based on the new method, an integrated model of water and energy flows was developed and applied in a greenhouse case study. The results of the application of the model indicated that changes in the technical configuration of a system are influenced by the scarcity of resources, prices of input, substitution, and complementary production factors. Such complex interaction was represented in the developed model which has considered the flows of water, energy, and material simultaneously. The final watergy service (e.g., the rose production) was also considered in the developed model. The novel distinction in the present study is the provision of the optimal combination of technologies to provide watergy services, unlike in previous models which have selected the optimal combination of technology to meet different water demands and different energy demands separately. Another advantage of the present model is the provision of an optimal combination of technologies based on the watergy optimal point for production. In previous researches, the consumption of resources, and the thermodynamic simulation of technologies in greenhouses have been presented, but the choice of technology has not been discussed.
The results obtained by the application of the model in a case study indicated that the scarcity of resources and prices of input resources have had considerable impacts on the technological mix of the greenhouse production and resource efficiency. The summary of the main findings based on the watergy optimal point in the studied scenarios are: • The crop drainage recovery and recycling technology (the closed irrigation system) are recommended, which result in the reduction of water and the fertilizer usage and easing environmental issues. Also, In the face of limited water resources, the use of wastewater recycling technologies and small-scale treatment systems has led to the use of nonconventional water resources. Recycling and treatment technologies reduced the fresh water consumption by up to 12% and have led to an increase in the electricity consumption of up to 1.2%. • In areas with water scarcity, the pad-fan system is preferred to the fogging system (including the RO) for cooling. Appendix G ( Figure G. 1, Figure G. 2) shows a comparison of the two technologies based on the three indicators of the water and energy consumption, and the investment cost required. • With the increase of the electricity price, CHP is used for the heat (7% of the total heat demand) and power demand. With the simultaneous increase in the prices of natural gas and electricity, the installation of PV panels is preferred. • The RO technology has been recommended as a strategy to treat saline water for being utilized in greenhouses although the electricity consumption has increased (up to 19%) using this technology for improving the water quality. The results of the sensitivity analysis show that using the WEGMA-1 model with the watergy concept, a reduction of 31% in the consumption of electricity and a decrease in the water consumption of up to 18% are possible. These achievements are also accompanied by up to 25% lesser usage of the fertilizer related to the case of the business as usual. In the present study, unlike in previous models, the inherent consideration of the watergy service supply from the system reflects the demand for water and energy endogenously. This improves the efficiency of using resources in the optimal design based on the watergy concept. The feature caused to reflect the complete interaction between the water and energy subsystem. This helps the policymakers and investors to consider macro and long-run changes in the boundary conditions of the water and energy subsystem for developing sustainable systems to supply sustainable products. This includes the increase of price or the scarcity of resources and the assessment of new technologies. Finally, in order to complete the research objectives of the present study, the consideration of a transition state for the water resources, its storage and its recycling systems in the watergy model is suggested for the improvement of the application of the proposed model in future studies. Also, consideration of decreasing technical performance of the installed technologies through their life-time as well as the increasing efficiencies of the technologies due to research and development are suggested to be included in the system modelling in the future researches.

ACKNOWLEDGMENTS
The authors would like to thank Mr. Kamran Ranjbar Kohan and his brothers, the owners of Nikan Greenhouse, Alborz province of Iran, for providing us with data on the greenhouse that included the water, energy, and material consumption. Data provided by Nikan Greenhouse have enabled us to validate the model by the actual performance of the greenhouse cultivation.

Symbols
The The amount of reference evapotranspiration Elevation factor Energy/water consumption in type τ technology for j watergy services or products through the conversion of k energy or water at time t.
ℎ Light intensity factor The production of n flow in the τ technology from l flow at time t. Temperature increase factor of the distance from the pad to the fan Value of water necessary to inject into or reject from the greenhouse for maintaining the desired water content in the greenhouse atmosphere [g.m -2 ] The historical capacity of τ technology for converting k energy carrier or k quality water into j useful energy or j quality water at time θ, where θ is the point between (b -θ) and b, b is the reference year (base year) and PL is the plant life of technology.  The amount of water losses r (wastewater) can be recycled or discharge to the environment from τ technology at time t from conversion of l flow to n. The flow of water g from v resource at time t New capacity (capacity increase) of the τ technology to convert energy carriers or k quality water to useful energy or j quality water at time w, where w is a point between 1 and t. Z The current value of total system costs The contribution in useful watergy services with j quality Coefficient of r wastewater flow produced from the conversion of l flow to n flow in τ technology at time t. τ Technology efficiency for o flow at time t The efficiency of the final device which converts the energy or quantity of water with the quality of k into watergy service j quality at time t.

APPENDICES
The appendices are in the order mentioned in the text in this section. Figure A. 1, shows a scheme of the overall watergy system that contains two water (B) and energy (A) subsystems and their overlapping, interaction and common space (C; watergy). The conceptual model based on the watergy concept indicates that energy is flowing in the energy subsystem (A), and water is flowing in the water subsystem (B). Two subsystems are the integral part of the overall watergy system.

Appendix C
ESM (Energy System Model) is a bottom-up technology-based optimization model. ESM is a total system energy model, developed to integrate analysis of different aspects and dimensions of the development of total energy sector and to provide a means of reviewing the total outlook of energy supply system. It can also be applied for comprehensive analysis of the long-term development of energy sector. ESM has been developed as a software and it has been made operational in 2002. The technical report of ESM [49] is structured to provide information on the theoretical background, description and formulation of the ESM model and the fundamental equations and functions representing different aspects and dimensions of energy utilization. More information about ESM is available in [49,51].
The ESM is based on the optimal point with the objective function of minimum total cost. In present study the water subsystem in this model has been developed alongside the energy subsystem to achieve an integrated watergy system at a spatial location, with the assumption of a load zone. Also added water resource cost and treatment technologies in objective function of minimum total cost and constraints reflect the water as a main resource cost (instead of variable operational cost).

Appendix D
The solution strategy and brief schematic of the WEGMA-1 (model process) algorithm are demonstrated in Figure   Simultaneously increasing water and energy consumption from cold season to hot season ( Figure F. 2) in a unique greenhouse system is based on the third principle of six principles of watergy system. Figure G. 1 shows a comparison of the two technologies based on the three indicators of water consumption, energy consumption, and the investment cost required for the pad-fan and fogging (including the RO water treatment system).

Appendix H
Comparing different scenarios suggests that selecting water treatment technologies, besides the reduced fresh water consumption, has resulted in increased energy consumption.