Techno-Economic Investigation of Using Solar Energy for Heating Swimming Pools in Buildings and Producing Hydrogen: A Case Study

Solar energy is a free and environmentally friendly supply of power that has negligible impact on the environment, and it has long been used by humans through different methods. However, solar energy technology would use for heating water for buildings as an alternative resource, which would help reduce CO2 reduction and safe environment. A data analysis was performed using the RETScreen software, and the financial outcomes that were calculated using two methods. Clearly, the software is operational with two different methods. Both methods indicate that this project is economically feasible. The aim of this study is to evaluate the utilization of solar energy for household and commercial purposes. The first goal is to explore the technical, economic, and environmental aspects of using evacuated glass tube solar collectors to heat water in an indoor pool in the building, having an area of 50 m2, in the city of Yazd, Iran. The second goal is to evaluate the amount of hydrogen that can be obtained from the installation photovoltaic systems in the province. The results also show that this project will decrease greenhouse gas emissions by 142 ton-CO2 over 20 years of the useful life of a collector, thereby indicating the possible significant role of such collectors in the reduction of greenhouse gas emissions. Furthermore, the findings indicate that installing a single X21-345 photovoltaic system with a performance rate of 20% can result in the production of 2.1 kg of hydrogen annually.


INTRODUCTION
Solar energy is the most popular renewable energy which many researchers have considered for electricity generation (Ahmadi et al., 2018). In recent years, special attention has been paid to renewable energies (Mostafaeipour and Abesi, 2010). Increasing fuel consumption, air pollution, and adverse environmental phenomena such as global warming and climate change have stimulated researchers to focus on the replacement of fossil fuels with clean and renewable energy (Mostafaeipour et al., 2020b;Kalbasi et al., 2021). The increasing importance of environmental issues have led to the diversification of energy sources, while globalization and the consequent increase in competition between countries have caused most economists and statesmen to consider the management and optimization of energy consumption as a strategic policy. Integration of renewable energies assists energy systems to reduce environmental contamination significantly (Sadeghzadeh et al., 2019). Hence, there is a surging need to present sustainable solutions such as utilizing renewable energy sources to reach more efficient energy systems (Ghorbani et al., 2020). Therefore, funds are now being allocated for studies and research aimed at replacing fossil fuels and supporting renewable energy in order to come up with new ways of optimizing energy (Mostafaeipour et al., 2020a,d). It is expected that in the near future, renewable and clean energy will hold a larger share of the total energy supply. Solar energy is a free and clean source of energy that has minimal impact on the environment, and it has long been used by humans through various methods (Mohammadi et al., 2014a;Goudarzi and Mostafaeipour, 2017;Rezaei et al., 2018b;Mostafaeipour et al., 2019).
The use of solar energy as a source of renewable energy has expanded rapidly because of its abundance and availability. This form of energy has been commercially available for heating water since the 1800s; The first solar water heater (known as Climax) was invented by Clarence Kemp in 1891. It was comprised of four long cylindrical water tanks made of galvanized iron sheets that had been painted black. These water tanks were placed horizontally in an insulated, glass-covered box. The current concept of solar water heaters is the same as that of the thermosiphon system that was introduced by William J.A. Bailey in 1909 (Azizi and Faryadi, 2012). The energy crisis of the 1970s was a wake-up call for all countries in the world that fossil fuels are not the only way to supply energy (Mostafaeipour et al., 2020c). For this purpose, renewable energy sources have been suggested as alternative sources of energy. In the meantime, the great progress made in the field of solar collector manufacturing techniques has drawn attention to the use of solar energy. Over the past several decades, the use of solar water heating systems has become more significant because of their economic benefits (reduced costs, fuel conservation), environmental benefits (reduced fossil fuel consumption, and gas emissions such as particulate matter, NOx, CO2, SOx, and other pollutants), and social benefits (providing cheaper and cleaner hot water) (Haj-Saghati, 2010;Rezaei et al., 2018a).
Iran, as a Southwest Asian country, is located between latitudes 25-40 • N and longitudes 44-64 • E. It has an area of approximately 1.65 km × 10 6 km, and its climate varies considerably because of its diverse topographies. This country has dry conditions, with a desert and semi-desert climate. Iran has great potential in terms of renewable energy, and therefore, it is among the top countries in terms of the amount of available solar energy (Rezaei-Shouroki et al., 2017).
Previous research works related to solar resource assessments in Iran show that the yearly average of sunny days is almost 300, which is remarkable (Rezaei-Shouroki et al., 2017). Within two years, from 2000 to 2002, about 350 solar water heaters were installed in some cities of Iran, including Bushehr, Tabas, Yazd, Bojnoord, Zahedan, and Isfahan. This represented a significant expansion in the use of solar energy with the support of the Iranian Fuel Conservation Organization (IFCO; Mostafaeipour et al., 2017b). According to Mostafaeipour et al. (2017a,b), the city of Yazd is situated in the yellow radiation belt, which means that it has a high potential to receive solar energy. The available radiant energy in Yazd, according to estimates, appears to be about 7,787 MJ/m 2 . This city, with an average of 3,200 h of sunshine annually, is a suitable place for the installation of solar water heater systems.
There are many studies in the literature that concentrate on the assessment of solar energy in various locations of Iran. Najafi et al. (2015) reviewed the current state of solar energy in Iran, and found that the technical potential of solar energy is about 14.7 TW, which puts the country among those with a high potential for solar energy. Mohammadi et al. (2014b) performed a feasibility assessment of solar and wind energy in three industrial zones of Iran, and the outcomes confirmed that all the examined stations are suitable for the utilization of solar energy. Jafarpur and Yaghoubi (1989) determined the monthly and yearly radiation quantities for the city of Shiraz. In Sabziparvar (2007), six solar radiation estimation models were considered and applied to the coastal cities of Iran, and the comparisons that were made demonstrated that the MD method is the most appropriate model.
There are also many studies in the literature that deal with solar water heaters. In Atikol et al. (2013), the use of solar energy for hot water production, electricity generation and space heating were evaluated for a project in Cyprus, and the results showed that solar water heaters are more economical than a 3-kW electric heater, particularly for heating water. Benli (2016) compared two solar water heaters with different prices and performances for use in six provinces of Turkey. He concluded that the galvanized sheet absorber was more proper in terms of its coverage rate for the energy required for heating water in Turkey. Lin et al. (2015) developed a procedure for determining the payback period for solar water heaters used for residential purposes. The analysis for southern Taiwan showed that favorable results were obtained when the daily load volume per area of a solar collector was increased. Gastli and Charabi (2011) studied and analyzed the applicability of solar water heaters in saving energy in urban areas on the coast of Oman. The results showed that the annual energy savings were about 335,431 MW, and the reduction in greenhouse gases reached up to 48,590 ton-CO2. A research that was conducted in Greece demonstrated that by using residential solar water heaters during the years 1978-2007, the savings in residential electricity consumption rose from 0.07% in 1978 to 2.37% in 2007. It also showed that air emissions from this sector were reduced such that the amount of CO 2 emissions were reduced by 44.7% (Tsilingiridis and Martinopoulos, 2010). Solar energy is the most abundant renewable energy in Yazd Province. According to the literature review, there have been very few detailed studies based on economic and environmental analyzes that focused on the use of solar collectors to heat pool water.Therefore in this study, the possibility of using solar collectors for heating water in a pool located in Yazd was investigated and analyzed from the economic and environmental perspectives using the RETScreen (V. 4) software. Also, a solarpowered hydrogen production system using an electrolyzer was examined. So far, research in the field of using solar collectors for heating water in a pool has not examined the hydrogen production system, and this is another innovation of the present study.
The remainder of this paper is organized as follows. Section "Geographical Characteristics" provides a brief geographical description of the studied location, Yazd. Section "Materials and Methods" presents the principle of solar collectors and the process of water heating. Then, two different methods are introduced and implemented using the RETScreen software. Three different analyses on the techno-economics, gas emissions, and economics (based on methods 1 and 2) are carried out in section "Results and Discussion". Moreover, the configurations of the solar collector under consideration as well as the constraints and conditions are also stated in this section. The conclusions are drawn in section "Conclusion."

GEOGRAPHICAL CHARACTERISTICS
Yazd province, with an area of 129,285 km 2 , is situated in an arid and semi-arid belt over the Northern Hemisphere. More than 84.5% of Yazd province is covered by desert, and only about 16% of its land is located in non-desert areas. Rainfall here may occur in 22 days per year. On average, Yazd has 3,200 sunny hours and 90 non-sunny days per year. Yazd, with an average annual precipitation of 61.02 mm, is among the cities in the country with the lowest precipitation. The maximum temperature in Yazd is 45 • C, and the minimum temperature is -20 • C. In addition, the annual average temperature varies between 11.9 and 20.17 • C 1 . Table 1 illustrates Yazd climatic characteristics.

MATERIALS AND METHODS
In the seasons of spring and summer, when the gas tariff is twice the normal price, residential complexes that have swimming pools must often pay very high costs for this service. The use of solar collectors for heating water will lead to a sharp reduction in such costs.
The collectors are flat plates or tubes made of glass that use solar radiation to heat the water inside them (Delfani et al., 2016).
The water is then circulated by linear pumps through pipes to a heat exchanger, after which, it is sent into the pool. However, since this project was only intended for the heating of pools, the heat exchanger was bypassed and the water was sent directly to the collector for heating as the use of a heat exchanger would mean that a longer time would be required for the pool water to be heated (Zou et al., 2016).
In considering the geographical and climatic characteristics of Yazd and assuming that the pool was made available for use by the public, data was first collected from the literature regarding the types of solar collectors and their technology, the amount of annual solar radiation in Yazd, the lifespan of the collectors, the duration of the functions, the primary costs and subsidiary costs, and their efficiency in heating water. Then, the appropriate collector (evacuated glass tube collector with indirect pressure) was selected, based on the specifications of the pool and the required amount of hot water. This type of collector utilizes double parallel vacuum glass tubes to heat the water, and each one has an absorber plate that is focused on one of the heat tubes. The heat is transferred from the hot end of the heat pipe by a heat exchanger (called a manifold) to the heat-transfer fluid of a residential hot water system with space heating 2 . The advantages of this type of collector include the generation of higher temperatures, reduced heat loss, and prevention of freezing. This collector has the capacity to heat between 500 and 700 L of water each day, and is able to increase the water temperature at a rate of 7 • C/h. This type of collector was selected based on its predominant features such as high performance, greater reliability, and low manufacturing cost. Each vacuum tube consisted of two glass tubes made of extremely strong borosilicate glass. The outer tube was transparent, allowing light to pass through with a minimum amount of reflection. The inner layer of the tube was impregnated with a special selective coating to provide minimum reflection and also better solar radiation absorption. The tops of the two glass tubes were welded together, and the air between the two glass walls was evacuated, while the end of the outer tube would be sealed at high temperatures. This "evacuation" of gasses created a vacuum, which played a crucial role in the performance of the evacuated tubes. Table 2 illustrates thorough performance of two different collectors which also indicates advantages and disadvantages of each system. Clearly, vacuum tube collectors have more advantages compared with flat plate collectors 3 .
RETScreen is an Excel-based clean energy project analysis software tool that has many options for the simulation of projects related to renewable energy (Lee et al., 2012). This software uses a comprehensive database, which was developed by the Canadian government for use in some industrial facilities, and helps decision makers to quickly and economically analyze the technical and financial viability of renewable energy projects, energy efficiency and simultaneous heat and power production  (Rahmanifar, 2011) 4 . Generally, two methods are used to conduct a complete investigation: an opportunity study (Method 1), and a feasibility study (Method 2). In this study, the analyses were carried out based on both methods. As the data was collected and entered into the software, it was important for the energy system to be evaluated by adjusting the options.
Hydrogen is of utmost value as a clean means of providing energy as no pollutant gases are generated during its utilization (Mostafaeipour et al., 2020b). In this regard, the production of hydrogen using renewable energy resources has attracted much attention in recent years. Therefore, this study examined a solar-to-hydrogen energy conversion system by means of 4 http://www.retscreen.net (accessed April 8, 2019). the electrolysis of water. The amount of hydrogen that can be produced in this city is directly dependent on the amount of electricity that is produced by the photovoltaic systems. For further calculations, the X21-345 photovoltaic system manufactured by Sun Power, which has a surface area of 1.63 m 2 and a module efficiency of 21.16%, was evaluated as a power source 5 . The amount of electrical energy generated by this photovoltaic system was projected by Eq. 1 . This energy was employed as the power source input for the water electrolysis system.
where A, r, andH refer to the total area of the solar panel (in m 2 ), the module efficiency (provided by the manufacturer as a technical specification), and the average annual solar radiation received by the photovoltaic panels, respectively. PR is the performance rate of the system, and it depends on the location and size of the solar station, and the system technology. After calculating the amount of electricity gained at the output of the photovoltaic systems, Eq. 2 was utilized to estimate the amount of hydrogen that could be produced by the proposed system : where, E ele is the amount of electricity consumed by the electrolysis system, and eff is the rectifier efficiency. The reduction in the cost of environmental damage caused by greenhouse gas emissions can be determined by Eq. 3.

GHGs emission reduction costs =
Annual life cycle saving Net GHG reduction (3) In order to calculate Pay Back Period (PBP), the change of the net present worth (NPW) must be examined to determine the time when a zero value is reached. The NPW is calculated by Eq. 4 as following (Orioli and Ganji, 2017): where Nt is the useful life, CFt is the cash flow related to the generic t-th year, IV is the initial investment cost and k is the discount rate.

RESULTS AND DISCUSSION
In the first step, the specifications of the pool under consideration were entered into the software. Some information, such as the configurations of the solar water heater, where the technology involved the use of an evacuated tube solar collector without the need for a tank, had to be inserted. One of the best ways to reduce heat loss, particularly for outdoor swimming pools is to use pool covers when the pool is not in use. The considered pool in this analysis was an indoor pool, so it did not require any pool cover. Usually, the ideal temperature for a commercial swimming pool is between 29 and 28 • C. The loss of heat due to evaporation, as described in the software, is between 5 and 10%. The lowest percentage (5%) should be selected for residential pools. Table 3 presents the specifications of the pool that was considered in the heating project, also technical specifications of solar collectors used for this study. Figure 1, which illustrates the distribution of the pool usage during different months of the year, shows that it was used more during the summer period.
To obtain an acceptable result, the technical information regarding the collector and its installation conditions should be entered into the software. There are four solar tracking options, including fixed mount, single-axis, dual-axis, and azimuth. In this   research, a fixed mount tracking system was used. The tilt is the angle between the solar collector and the horizon, which in fixed collectors is equal to the angle of the mount. Another parameter required for the software is Fr (also known as τα), which is dimensionless and is used to identify the optical efficiency of the selected collector. The value of the Fr coefficient is within the range of 0.5-0.9 for different collectors, of which the lowest value was considered for the evacuated tube solar collector. The Fr-UL is another parameter that is required for the analysis, and it describes the thermal losses of the collector. In the present study, the value of the UL coefficient for this type of collector had to be in the range of 0.7-3 (W/m 2 )/ • C. Since the selected evacuated tube solar collector did not require a tank and heat exchanger to heat the pool water, hence, when adjusting the settings related to the thermal losses from the tank and pipes, only the loss in the pipe that was needed to install the collector was considered. The temperature coefficient (Fr-ULT) is a parameter that needs to be entered into the software if glazed or evacuated collectors are selected, and it represents the quadratic term for the efficiency equation. The temperature coefficient value was considered to be in the range of 0-0.01 (W/(m • C) 2 ). A pump power of 240 W was used to heat the pool water. Table 4 shows the technical information regarding the collector used in this project, and lists the required economic and financial information related to the solar collector that was used in this project. Some required financial inputs had to be entered into the software to obtain the economic results.
The prices of natural gas and electricity were considered as being equal to 0.020 $/m3 and 0.016 $/kWh, respectively 6 .
The results of the technical analysis on the use of solar collectors for heating the pool water were obtained by using the RETScreen software, and are presented in Table 5.  To investigate the effect of the solar collectors on the reduction of greenhouse gas (GHG) emissions, the data related to the power losses had to be inserted into the software. The power losses in the transmission and distribution (T&D) networks of Iran were approximately 17.6%, while the maximum acceptable value of these losses throughout the world at that time was almost 10% (Wang and Zhao, 2006). Table 6 shows the results that were obtained in relation to the evaluation of greenhouse gas emissions. An evaluation and economic analysis had to be performed on two different models using the RETScreen software as follows: After entering the information on the costs, as discussed in the previous section, and other economic data, such as the increase in fuel prices, the inflation rate (33%), and the lifespan (20 years), the results of the economic analysis were obtained based on these data, as presented in Table 7. The diagram of the cash flow with respect to the lifespan of the collector is shown in Figure 2.  The point that lies at the intersection of the chart line and the horizontal axis represents the payback period in the year.
According to the results obtained from the software, 51% of the energy required to heat the pool water was contributed by solar energy. Considering the price of electricity and natural gas, it was estimated that 6,669.5 m 3 of natural gas would be saved, thereby leading to a reduction of 7.1 ton-CO2/year in greenhouse gas emissions. The reduction in the cost of environmental damage caused by greenhouse gas emissions can be determined as: In order to determine the economic indices of the project, the net present value was calculated based on different inflation rates, and the results are shown in Figure 3. It is clear from Figure 3 that the graph followed an upward trend, and there was a gradual increase in the net present value as the inflation rate rose.
According to Figure 4, once the inflation rate reached 15%, the net value became positive and ascended with higher inflation rates, thereby indicating the increasing net present value. A value of 1 was obtained for the Benefit/Cost ratio at the point where the net present value curve crossed the x-axis, and in this case, the net present value was zero when the inflation rate was 12.35%. The higher ratio of the internal rate of return meant that the project was more economically attractive.
In this section, the following costs, in addition to the costs mentioned in Table 6, were considered for the feasibility study. The engineering design cost was considered as 10% of the total cost, the cost of the solar collector was considered as $6,000, and the development cost was equal to $650.
The feasibility studies were considered as free. The transfer fee was considered as being equal to $40. The considered labor cost to install one collector was $50. After entering this information into the software, the cash flow diagram in terms of a year was obtained, as shown in Figure 4. Additionally, the results of the economic analysis using Method 2 are provided in Table 8.
As can be seen from Table 7, the calculation based on Method 2 (by considering the costs mentioned in this section) resulted in an increase in the payback period in comparison with Method 1, and also led to a reduction in the internal rate of return and the Benefit/Cost ratio. However, the results of both methods showed that this project is economically feasible.
In this study, calculations were performed for 7 different performance rates of 20,25,30,35,40,45, and 50%. The yearly average solar radiation available in Yazd was computed using the daily average presented in Table 1. Table 9 shows the amount of electricity produced by the photovoltaic system that was examined based on all the performance rates.
For further calculations, it was postulated that the electrolyzer needed 5 kWh/Nm 3 or 55.6 kWh/kg of electricity. Moreover, the rectifier efficiency was assumed to be 90%. Table 10 presents the hydrogen production after the launch of the proposed system in Yazd. According to the results, if the performance rate of the photovoltaic system was 20%, then each set would generate 2.10 kg/year of hydrogen.

CONCLUSION
The exhaustible and declining reserves of fossil fuels have attracted much attention to the issue of renewable energies in recent decades. Some of the key reasons that illustrate the importance and necessity of using solar energy in Iran are the fact that it is an inexhaustible source of energy, the availability of relatively simple technology, it reduces greenhouse gas emissions, and saves on fossil fuels. The use of solar water heaters and collectors is not only economically beneficial but also gives a desirable return on investments, and can provide the needed energy over long periods. This paper assessed the technical, economic, and environmental aspects of using an evacuated glass tube solar collector to heat water in an indoor pool having an area of 50 m 2 . A data analysis was performed using the RETScreen software, and the financial outcomes were calculated using Method 1-a related opportunity study. The results showed a benefit-to-cost ratio of more than 1, a payback period of 10.8 years, and a reduction in the cost of greenhouse gas emissions of as much as $562, which all indicated that this project is economically feasible. This method also reduced greenhouse gas emissions by 142 ton-CO2 over twenty years of its useful life, indicating the possible effective role of this collector in the reduction of greenhouse gases. The financial analysis using Method 2 (the feasibility study) resulted in a benefit-to-cost ratio of more than 1, a payback period of 14.8 years, and a reduction in the cost of greenhouse gas emissions of as much as $192, indicating that this project is, in fact, economically feasible. Therefore, the use of solar energy, especially in a desert province such as Yazd, is feasible as long as the government properly supports, promotes, and facilitates the purchase and production of these systems. Taking advantage of the benefits of solar energy can improve the economic and environmental conditions of a desert region. Moreover, solar energy can be used for the production of hydrogen in the city, and the results indicated that utilizing one set of the X21-345 photovoltaic system with a performance rate of 20% can generate 2.1 kg of hydrogen annually.
Those interested in this field can follow the following: 1. Evaluation of the technical, economic, and environmental aspects of using an evacuated glass tube solar collector to heat water in an indoor pool in other parts of Iran and other countries with similar climates. 2. Determining the importance and weight of the technical, economic, and environmental aspects of using an evacuated glass tube solar collector to heat water in an indoor pool.
3. Prioritization of regions of Iran and other countries for using an evacuated glass tube solar collector to heat water in an indoor pool.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.

AUTHOR CONTRIBUTIONS
KA: supervision, writing, and editing. HG and NB: software, writing, conceptualization, software data curation, and original draft preparation. AM: original draft preparation, conceptualization, writing, methodology, software, and software data curation. MJ: reviewing and editing, visualization, and investigation. SH: reviewing and editing. SC and MR: conceptualization, editing, and writing. KT: conceptualization, writing, methodology, software, and editing. AI: writing, revising, and editing. All authors contributed to the article and approved the submitted version.