Development of Optimal Design Method for Ground-Source Heat-Pump System Using Particle Swarm Optimization

: The building sector is an energy-consuming sector, and the development of zero-energy buildings (ZEBs) is necessary to address this. A ZEB’s active components include a system that utilizes renewable energy. There is a heat-pump system using geothermal energy. The system is available regardless of weather conditions and time, and it has attracted attention as a high-performance energy system due to its stability and e ﬃ ciency. However, initial investment costs are higher than other renewable energy sources. To solve this problem, design optimization for the capacity of geothermal heat-pump systems should be performed. In this study, a capacity optimization design of a geothermal heat-pump system was carried out according to building load pattern, and emphasis was placed on cost aspects. Building load patterns were modeled into hospitals, schools, and apartments, and, as a result of optimization, the total cost over 20 years in all building load patterns was reduced.


Research Background
With the emergence of worldwide environmental problems such as global warming, goals have been set to reduce the use of fossil fuels and greenhouse gases (GHGs); major countries have implemented various policies to achieve these goals. China set a target to achieve a 35% proportion of renewable energy by 2030 through its Renewable Energy 13·5 Plan, and it is supporting projects for the development of renewable energy systems, such as wind power generation and photovoltaics [1]. Japan set its target proportion of renewable energy power to 22-24% by 2030, and it is planning to promote renewable energy as the main source of power for achieving this goal. The economic efficiency of renewable energy is planned by innovating technologies of renewable energy systems and reducing the cost of renewable energy; to achieve this goal, financing issues are being resolved and permission for occupation is being extended by up to 30 years to secure business stability [2]. Germany has established and promoted their Energiewende policy, informed by their Energy Concept 2010, as the basis for future energy policies. Energy Concept 2010 suggests a stepwise approach to achieving their energy and climate change goals by 2050, and it places emphasis on reducing GHG emissions by 80-95% compared to those in 1990 [3]. South Korea has a goal to increase the proportion of renewable energy generation to 20% by 2030, through its Renewable Energy "3020" Implementation Plan (Figure 1), and it is planning to increase the use of renewable energy, such as solar energy and wind power, to more than 95% in new facilities. To this end, it is promoting architecture incorporating renewable energy through the zero-energy building (ZEB) certification system and improving site restrictions and other systems that hinder business profitability [4]. The Korea Energy Agency identified the building sector as the largest energy consumer among all consumers, and one that exhibits a continuous increase in energy consumption. It expects energy consumption to increase by approximately 50% by 2050 if energy efficiency is not improved and, thus, ZEBs are needed to contribute to energy saving and a reduction in GHG emissions [5]. Through the 2019 Global Status Report for Buildings and Construction, the Global Alliance for Buildings and Construction identified buildings and the construction sector as the main targets for the reduction in GHG emissions because they use 36% of the energy and represent 39% of gas emissions [6] (as shown in Figure 2). Renewable energy applied to ZEBs includes solar energy, solar heat, and geothermal energy. Geothermal energy systems, which use the constant temperature of the ground, transfer the high indoor temperature to the ground in summer and respond to cooling/heating and domestic hot water The Korea Energy Agency identified the building sector as the largest energy consumer among all consumers, and one that exhibits a continuous increase in energy consumption. It expects energy consumption to increase by approximately 50% by 2050 if energy efficiency is not improved and, thus, ZEBs are needed to contribute to energy saving and a reduction in GHG emissions [5]. Through the 2019 Global Status Report for Buildings and Construction, the Global Alliance for Buildings and Construction identified buildings and the construction sector as the main targets for the reduction in GHG emissions because they use 36% of the energy and represent 39% of gas emissions [6] (as shown in Figure 2). architecture incorporating renewable energy through the zero-energy building (ZEB) certification system and improving site restrictions and other systems that hinder business profitability [4]. The Korea Energy Agency identified the building sector as the largest energy consumer among all consumers, and one that exhibits a continuous increase in energy consumption. It expects energy consumption to increase by approximately 50% by 2050 if energy efficiency is not improved and, thus, ZEBs are needed to contribute to energy saving and a reduction in GHG emissions [5]. Through the 2019 Global Status Report for Buildings and Construction, the Global Alliance for Buildings and Construction identified buildings and the construction sector as the main targets for the reduction in GHG emissions because they use 36% of the energy and represent 39% of gas emissions [6] (as shown in Figure 2). Renewable energy applied to ZEBs includes solar energy, solar heat, and geothermal energy. Geothermal energy systems, which use the constant temperature of the ground, transfer the high indoor temperature to the ground in summer and respond to cooling/heating and domestic hot water Renewable energy applied to ZEBs includes solar energy, solar heat, and geothermal energy. Geothermal energy systems, which use the constant temperature of the ground, transfer the high indoor temperature to the ground in summer and respond to cooling/heating and domestic hot water loads by absorbing heat from the ground in winter. These systems have attracted attention as systems with high efficiency and high performance because they can be used regardless of climatic conditions and time, and they are more stable than air as heat sources or heat sinks.
Geothermal energy systems, however, require a high initial investment cost compared to other renewable energy sources. For this reason, their distribution has not been promoted in the same way as other energy sources. In addition, it is difficult to relate the load pattern to the use of the building, Energies 2020, 13, 4850 3 of 17 the partial load operation characteristics of the heat pump, and the performance characteristics of the length of the ground heat exchanger. As a result, the initial investment cost may increase due to the overdesigned capacity, and it is necessary to improve the efficiency of geothermal energy systems and to optimally design the capacity according to the load pattern.
Several studies were conducted to improve the efficiency of geothermal energy systems. Bae et al. [7] conducted a thermal response test (TRT) by installing four types of ground heat exchangers (GHEXs) in one place. Heat-exchange performance was analyzed for high-density polyethylene (HDPE), HDPE-nano, spiral fin, and coaxial types. They revealed that the thermal resistance of the borehole can be an important element in TRT, but the influence of the increase in the thermal conductivity of the pipe material itself is not large. Park et al. [8] conducted analysis on the optimal design of the length of the ground heat exchanger according to the entering water temperature (EWT) of the heat pump using optimization simulation software. Kim et al. [9] analyzed the effects of design elements, such as the geometry and length of the ground heat exchanger and the capacity of the heat storage tank, on the system performance for actual buildings. Kim et al. [10] also determined the optimal design for the length of the ground heat exchanger, considering EWT for the analysis of economic efficiency. They found that the system efficiency and the borehole length increased as EWT decreased during cooling, and they analyzed its consequence.
Optimization algorithms were also used in other studies; for example, an optimization algorithm was used to set the characteristics of the passive elements of a building (e.g., direction and area ratio) as design variables and obtain values that lead to minimum energy consumption [11]. Moon et al. [12] conducted research on the optimal design of the capacity of a geothermal energy system for office buildings. They conducted research on cost optimization by setting the sum of the initial investment cost and the operating cost over 20 years as the objective function. The capacities of the ground heat exchanger, heat pump, and heat storage tank were set as design variables.
Various studies were conducted to improve the efficiency of geothermal systems, but studies on capacity design, considering both the efficiency and the cost of the system, are not sufficient. In addition, design methods that consider the load pattern of the building along with efficiency and cost when designing the capacity of a geothermal system have not been established. Therefore, research is required to derive the optimal design values according to the load pattern of the building, considering the aforementioned conditions and using an optimization algorithm.
In this study, modeling was performed according to the load patterns of buildings, and a geothermal system was constructed. In addition, the design elements (ground heat exchanger, heat pump, and heat storage tank) of the geothermal system were optimized. During the optimal design of the system capacity, an analysis was conducted on the influence of the load pattern of each building; the subsequent performance and economic efficiency of the geothermal system were analyzed.

Research Method
In this study, the optimal design results according to the load pattern were analyzed. The effect of each load pattern on the capacities of the design elements (ground heat exchanger, heat pump, and heat storage tank) of the geothermal system was analyzed. Figure 3 shows the flow chart of this study. First, building modeling was performed for each load pattern to calculate the loads of the target buildings. The items considered during the modeling of the target building were as follows: the thermal transmittance of the external wall, window area ratio, and floor height were considered as the external elements of the building, according to the use of each building, and the air-conditioning operating period, internal heat (occupants, lighting, and equipment load), and cooling/heating set-point temperature were considered as internal elements. When the loads of the target buildings were calculated using these values, the geothermal system, on the basis of the maximum load, was constructed by comparing and analyzing the values of cooling and heating loads. Optimal design was performed for the constructed geothermal system using optimization software. GSHP closed-loop ground arrays are designed for much longer lifetimes than 20 years, Energies 2020, 13, 4850 4 of 17 but the operation period was arbitrarily set at 20 years for economic analysis. The system operation period was set to 20 years, and the subsequent results were compared and analyzed. Particle swarm optimization (PSO) was selected as the optimization algorithm on the basis of a previous study [12]. equipment load), and cooling/heating set-point temperature were considered as internal elements. When the loads of the target buildings were calculated using these values, the geothermal system, on the basis of the maximum load, was constructed by comparing and analyzing the values of cooling and heating loads. Optimal design was performed for the constructed geothermal system using optimization software. GSHP closed-loop ground arrays are designed for much longer lifetimes than 20 years, but the operation period was arbitrarily set at 20 years for economic analysis. The system operation period was set to 20 years, and the subsequent results were compared and analyzed. Particle swarm optimization (PSO) was selected as the optimization algorithm on the basis of a previous study [12]. In this study, a hospital, a school, and an apartment building were set as target buildings. To analyze the energy demand of each building, the location of the target building and the thermal transmittance of the building's external wall were entered. The buildings were located in Busan, in the southern part of South Korea, which generally has a mild oceanic climate, with an average annual temperature of approximately 14 °C .
The thermal transmittance of the southern region, according to the Energy Saving Design Standards of Building [13] provided by the Ministry of Land, Infrastructure, and Transport of South Korea, was applied to the external walls of both residential and nonresidential buildings. Table 1 shows the thermal transmittance according to building use. To analyze the energy demand for a ward in the hospital building, modeling was performed; as shown in Figure 4, the size of the unit-type hospital room was set to 6.6 × 6.0 m [14]. The building had five stories and its total floor area was 2112 m 2 . In this study, a hospital, a school, and an apartment building were set as target buildings. To analyze the energy demand of each building, the location of the target building and the thermal transmittance of the building's external wall were entered. The buildings were located in Busan, in the southern part of South Korea, which generally has a mild oceanic climate, with an average annual temperature of approximately 14 • C.
The thermal transmittance of the southern region, according to the Energy Saving Design Standards of Building [13] provided by the Ministry of Land, Infrastructure, and Transport of South Korea, was applied to the external walls of both residential and nonresidential buildings. Table 1 shows the thermal transmittance according to building use. To analyze the energy demand for a ward in the hospital building, modeling was performed; as shown in Figure 4, the size of the unit-type hospital room was set to 6.6 × 6.0 m [14]. The building had five stories and its total floor area was 2112 m 2 .  The internal conditions of the hospital building and the schedules for occupancy and air conditioning were set on the basis of the prototype of hospital buildings provided by the United States (US) Department of Energy [15]. Figure 5 shows the occupancy and internal conditions of the hospital building. Air conditioning was operated 24 h a day. Occupancy, lighting, and equipment loads were applied differently for weekdays, Saturdays, and Sundays. The internal conditions applied to the prototype were prepared based on the American Society of Heating, Refrigerating, and Air-Conditioning Engineers (ASHRAE) Standard 90.1 [16] and ASHRAE Standard 62.1 [17], and the internal conditions of the hospital building are shown in Table 2. The set-point temperatures for cooling and heating were set to 26 and 20 °C, respectively. The cooling and heating periods were set to May-September and November-February by referring to the average temperature in Busan, South Korea.  The cooling/heating loads of the hospital building were analyzed using dynamic analysis simulation software. The simulation time interval was set to 5 min, and the simulation was performed for system operation over a one-year period. Figure 6 shows the daily cooling/heating load patterns The internal conditions of the hospital building and the schedules for occupancy and air conditioning were set on the basis of the prototype of hospital buildings provided by the United States (US) Department of Energy [15]. Figure 5 shows the occupancy and internal conditions of the hospital building. Air conditioning was operated 24 h a day. Occupancy, lighting, and equipment loads were applied differently for weekdays, Saturdays, and Sundays. The internal conditions applied to the prototype were prepared based on the American Society of Heating, Refrigerating, and Air-Conditioning Engineers (ASHRAE) Standard 90.1 [16] and ASHRAE Standard 62.1 [17], and the internal conditions of the hospital building are shown in Table 2. The set-point temperatures for cooling and heating were set to 26 and 20 • C, respectively. The cooling and heating periods were set to May-September and November-February by referring to the average temperature in Busan, South Korea.  The internal conditions of the hospital building and the schedules for occupancy and air conditioning were set on the basis of the prototype of hospital buildings provided by the United States (US) Department of Energy [15]. Figure 5 shows the occupancy and internal conditions of the hospital building. Air conditioning was operated 24 h a day. Occupancy, lighting, and equipment loads were applied differently for weekdays, Saturdays, and Sundays. The internal conditions applied to the prototype were prepared based on the American Society of Heating, Refrigerating, and Air-Conditioning Engineers (ASHRAE) Standard 90.1 [16] and ASHRAE Standard 62.1 [17], and the internal conditions of the hospital building are shown in Table 2. The set-point temperatures for cooling and heating were set to 26 and 20 °C, respectively. The cooling and heating periods were set to May-September and November-February by referring to the average temperature in Busan, South Korea.  The cooling/heating loads of the hospital building were analyzed using dynamic analysis simulation software. The simulation time interval was set to 5 min, and the simulation was performed for system operation over a one-year period. Figure 6 shows the daily cooling/heating load patterns  The cooling/heating loads of the hospital building were analyzed using dynamic analysis simulation software. The simulation time interval was set to 5 min, and the simulation was performed Energies 2020, 13, 4850 6 of 17 for system operation over a one-year period. Figure 6 shows the daily cooling/heating load patterns of the hospital building. In the case of the ward, the cooling load was found to be relatively higher than the heating load due to the internal heat generated by the patients and equipment. The maximum load during the cooling operation was approximately 44.4 kW on 20 September, and the maximum load during the heating operation was approximately 36.9 kW on 31 January. In this study, the system was designed on the basis of the maximum cooling/heating loads. Therefore, the capacity of the geothermal system of the hospital building was designed to respond to the maximum cooling load of 44.4 kW.
Energies 2020, 12, x FOR PEER REVIEW 6 of 17 of the hospital building. In the case of the ward, the cooling load was found to be relatively higher than the heating load due to the internal heat generated by the patients and equipment. The maximum load during the cooling operation was approximately 44.4 kW on 20 September, and the maximum load during the heating operation was approximately 36.9 kW on 31 January. In this study, the system was designed on the basis of the maximum cooling/heating loads. Therefore, the capacity of the geothermal system of the hospital building was designed to respond to the maximum cooling load of 44.4 kW.

Figure 6.
Daily cooling/heating loads of the hospital building.

School
To analyze the energy demand of the school building, modeling was performed as shown in Figure 7. The building had four stories with corridors, and the classroom was designed to be 8.1 × 8.1 m [18]. As with the hospital, the internal conditions of the school building and the schedules for occupancy and air conditioning were set on the basis of the prototype of buildings provided by the US Department of Energy [15]. Figure 8 shows the occupancy and internal conditions of the school building. Due to the nature of the school building, occupancy and air conditioning were not considered on weekends. Table 3 shows the internal conditions applied to the school building. As the building was located in Busan, the same cooling/heating set-point temperatures and air-conditioning operating periods as the hospital building were applied.

School
To analyze the energy demand of the school building, modeling was performed as shown in Figure 7. The building had four stories with corridors, and the classroom was designed to be 8.1 × 8.1 m [18].
Energies 2020, 12, x FOR PEER REVIEW 6 of 17 of the hospital building. In the case of the ward, the cooling load was found to be relatively higher than the heating load due to the internal heat generated by the patients and equipment. The maximum load during the cooling operation was approximately 44.4 kW on 20 September, and the maximum load during the heating operation was approximately 36.9 kW on 31 January. In this study, the system was designed on the basis of the maximum cooling/heating loads. Therefore, the capacity of the geothermal system of the hospital building was designed to respond to the maximum cooling load of 44.4 kW.

Figure 6.
Daily cooling/heating loads of the hospital building.

School
To analyze the energy demand of the school building, modeling was performed as shown in Figure 7. The building had four stories with corridors, and the classroom was designed to be 8.1 × 8.1 m [18]. As with the hospital, the internal conditions of the school building and the schedules for occupancy and air conditioning were set on the basis of the prototype of buildings provided by the US Department of Energy [15]. Figure 8 shows the occupancy and internal conditions of the school building. Due to the nature of the school building, occupancy and air conditioning were not considered on weekends. Table 3 shows the internal conditions applied to the school building. As the building was located in Busan, the same cooling/heating set-point temperatures and air-conditioning operating periods as the hospital building were applied. As with the hospital, the internal conditions of the school building and the schedules for occupancy and air conditioning were set on the basis of the prototype of buildings provided by the US Department of Energy [15]. Figure 8 shows the occupancy and internal conditions of the school building. Due to the nature of the school building, occupancy and air conditioning were not considered on weekends. Table 3 shows the internal conditions applied to the school building. As the building was located in Busan, the same cooling/heating set-point temperatures and air-conditioning operating periods as the hospital building were applied.  When the cooling/heating loads of the school building were analyzed, the daily maximum cooling and heating loads were found to be similar. Figure 9 shows the annual cooling and heating load patterns of the school building. The maximum load during the cooling operation was approximately 95.7 kW on 22 July, and the maximum load during the heating operation was approximately 92.5 kW on 12 February. On the basis of the daily cooling/heating loads, the capacity of the geothermal system of the school building was designed to respond to the maximum cooling load. Figure 9. Daily cooling/heating loads of the school building.

Apartment
Once again, with the apartment building, modeling was performed on the basis of the prototype provided by the US Department of Energy [16], as shown in Figure 10.  When the cooling/heating loads of the school building were analyzed, the daily maximum cooling and heating loads were found to be similar. Figure 9 shows the annual cooling and heating load patterns of the school building. The maximum load during the cooling operation was approximately 95.7 kW on 22 July, and the maximum load during the heating operation was approximately 92.5 kW on 12 February. On the basis of the daily cooling/heating loads, the capacity of the geothermal system of the school building was designed to respond to the maximum cooling load.  When the cooling/heating loads of the school building were analyzed, the daily maximum cooling and heating loads were found to be similar. Figure 9 shows the annual cooling and heating load patterns of the school building. The maximum load during the cooling operation was approximately 95.7 kW on 22 July, and the maximum load during the heating operation was approximately 92.5 kW on 12 February. On the basis of the daily cooling/heating loads, the capacity of the geothermal system of the school building was designed to respond to the maximum cooling load.

Apartment
Once again, with the apartment building, modeling was performed on the basis of the prototype provided by the US Department of Energy [16], as shown in Figure 10.

Apartment
Once again, with the apartment building, modeling was performed on the basis of the prototype provided by the US Department of Energy [16], as shown in Figure 10. The internal conditions of the apartment building and the schedules for occupancy and air conditioning were also set on the basis of the prototype of buildings provided by the US Department of Energy [15]. Figure 11 shows the occupancy and internal conditions of the apartment building. It was assumed that one or more persons were present for 24 h. In the case of the apartment building, the schedules were set to all day without the division of weekdays and weekends. Table 4 shows the internal conditions applied to the apartment building. Figure 11. Occupancy, lighting, and equipment schedules of the apartment building. January-February, November, and December Month Figure 12 shows the daily cooling/heating load patterns of the apartment building. The heating load was found to be higher than the cooling load. It appears that load patterns different from those of the hospital were observed because the values of the internal conditions (lighting and equipment loads) were smaller than those of the hospital, even though the 24 h air-conditioning operating schedules were the same. The maximum load during the cooling operation was approximately 28.4 The internal conditions of the apartment building and the schedules for occupancy and air conditioning were also set on the basis of the prototype of buildings provided by the US Department of Energy [15]. Figure 11 shows the occupancy and internal conditions of the apartment building. It was assumed that one or more persons were present for 24 h. In the case of the apartment building, the schedules were set to all day without the division of weekdays and weekends. Table 4 shows the internal conditions applied to the apartment building.
The internal conditions of the apartment building and the schedules for occupancy and air conditioning were also set on the basis of the prototype of buildings provided by the US Department of Energy [15]. Figure 11 shows the occupancy and internal conditions of the apartment building. It was assumed that one or more persons were present for 24 h. In the case of the apartment building, the schedules were set to all day without the division of weekdays and weekends. Table 4 shows the internal conditions applied to the apartment building.  January-February, November, and December Month Figure 12 shows the daily cooling/heating load patterns of the apartment building. The heating load was found to be higher than the cooling load. It appears that load patterns different from those of the hospital were observed because the values of the internal conditions (lighting and equipment loads) were smaller than those of the hospital, even though the 24 h air-conditioning operating schedules were the same. The maximum load during the cooling operation was approximately 28.4 Figure 11. Occupancy, lighting, and equipment schedules of the apartment building.  Figure 12 shows the daily cooling/heating load patterns of the apartment building. The heating load was found to be higher than the cooling load. It appears that load patterns different from those of Energies 2020, 13, 4850 9 of 17 the hospital were observed because the values of the internal conditions (lighting and equipment loads) were smaller than those of the hospital, even though the 24 h air-conditioning operating schedules were the same. The maximum load during the cooling operation was approximately 28.4 kW on 3 September, and the maximum load during the heating operation was approximately 76.5 kW on 10 January. On the basis of the daily cooling/heating loads, the capacity of the geothermal system of the apartment building was designed to respond to the maximum heating load.
Energies 2020, 12, x FOR PEER REVIEW 9 of 17 kW on 3 September, and the maximum load during the heating operation was approximately 76.5 kW on 10 January. On the basis of the daily cooling/heating loads, the capacity of the geothermal system of the apartment building was designed to respond to the maximum heating load.

Figure 12.
Daily cooling/heating loads of the apartment building.

Optimization Algorithm
In this study, the particle swarm optimization (PSO) algorithm was used to perform the optimal design of the geothermal system. PSO was developed on the basis of the social behavioral pattern of a group of birds or fish [19], and it finds the optimal values of each particle with inertia, as well as cognitive and social power moves. The optimization method of PSO can be expressed as shown in Figure 13. Each particle seeks the minimum objective value according to its position and velocity. To find the optimal value, each particle moves with reference to the previous particle-best position (pbest) and the best position for each generation (gbest), and pbest and gbest are updated as shown in Equations (1) and (2). The velocity and position of each particle are updated as shown in Equations (3) and (4) [20]. PSO does not utilize the concept that the characteristics of particles are inherited, unlike the genetic algorithm (GA). PSO focuses on the exchange of information on the particles and shares the results of each particle and generation to find the optimal solution [19]. Because optimization is performed on the basis of this method of analysis, local optimization is less likely than optimization algorithms which are optimized by convergence. PSO is used in various fields due to the relatively short calculation time and the slim possibility of reaching local optimization [21].

Optimization Algorithm
In this study, the particle swarm optimization (PSO) algorithm was used to perform the optimal design of the geothermal system. PSO was developed on the basis of the social behavioral pattern of a group of birds or fish [19], and it finds the optimal values of each particle with inertia, as well as cognitive and social power moves. The optimization method of PSO can be expressed as shown in Figure 13. Each particle seeks the minimum objective value according to its position and velocity. To find the optimal value, each particle moves with reference to the previous particle-best position (pbest) and the best position for each generation (gbest), and pbest and gbest are updated as shown in Equations (1) and (2). The velocity and position of each particle are updated as shown in Equations (3) and (4) [20]. PSO does not utilize the concept that the characteristics of particles are inherited, unlike the genetic algorithm (GA). PSO focuses on the exchange of information on the particles and shares the results of each particle and generation to find the optimal solution [19]. Because optimization is performed on the basis of this method of analysis, local optimization is less likely than optimization algorithms which are optimized by convergence. PSO is used in various fields due to the relatively short calculation time and the slim possibility of reaching local optimization [21].
Energies 2020, 12, x FOR PEER REVIEW 9 of 17 kW on 3 September, and the maximum load during the heating operation was approximately 76.5 kW on 10 January. On the basis of the daily cooling/heating loads, the capacity of the geothermal system of the apartment building was designed to respond to the maximum heating load.

Optimization Algorithm
In this study, the particle swarm optimization (PSO) algorithm was used to perform the optimal design of the geothermal system. PSO was developed on the basis of the social behavioral pattern of a group of birds or fish [19], and it finds the optimal values of each particle with inertia, as well as cognitive and social power moves. The optimization method of PSO can be expressed as shown in Figure 13. Each particle seeks the minimum objective value according to its position and velocity. To find the optimal value, each particle moves with reference to the previous particle-best position (pbest) and the best position for each generation (gbest), and pbest and gbest are updated as shown in Equations (1) and (2). The velocity and position of each particle are updated as shown in Equations (3) and (4) [20]. PSO does not utilize the concept that the characteristics of particles are inherited, unlike the genetic algorithm (GA). PSO focuses on the exchange of information on the particles and shares the results of each particle and generation to find the optimal solution [19]. Because optimization is performed on the basis of this method of analysis, local optimization is less likely than optimization algorithms which are optimized by convergence. PSO is used in various fields due to the relatively short calculation time and the slim possibility of reaching local optimization [21].  (2) (2) where i denotes the particle, N p is the number of particles, t is the current iteration number of optimization, and P is the position [21].
where V denotes the velocity, ω is the inertial weight, r represents distributed random variables within the range [0, 1], and c represents positive constant parameters called "acceleration coefficients" [21].

Optimization Design Variables, Objective Function, and Constraints
In this study, research was conducted to reduce the cost of the geothermal system. To this end, an analysis was conducted of the geothermal system capacity that led to the lowest sum of the investment cost and the operating cost over 20 years.
The length of the ground heat exchanger (GHEX) and the capacities of the heat pump (HP) and the heat storage tank (HST), which are included in the initial investment cost, were set as the design variables of optimal design. Table 5 shows the capacities of the geothermal HP system for each target building. The sum of the initial investment cost and the operating cost over 20 years was set as the objective function. The initial investment cost was calculated by multiplying the design variables, i.e., the unit price, length, and capacity of the GHEX, HP, and HST. The operating cost over 20 years was calculated considering the energy consumed by the operation of the geothermal system applied to the building and the unit price of the energy source, over the 20 year period, and the present worth of annuity factor (PWAF).
C Conventional Heat storage tank = C Price per liter Heat storage tank × Heat storage tank Capacity, C Energy Year f (x) = C GHEX + C Heatpump + C Heat storage tank + C Energy 20 Year × PWAF, where C Conventional GHEX is the initial investment cost of the GHEX, C Price per m GHEX is the cost of the GHEX per meter, and GHEX Length is the total length of the GHEX. C Conventional Heatpump is the initial investment cost of the is the annual energy cost, and 12 i=1 C Energy month (i) is the cost of the energy consumed per year. PWAF stands for the present worth of annuity factor, whereas i represents PWAF, and n is the number of years.
In optimal design, setting constraints is important. In this study, constraints were set on the indoor temperature to prevent the groundless reduction of the values of the design variables. By referring to the ASHRAE Standard, unmet load hours were set to not exceed 300 h for the indoor temperature of the target buildings [22]. When this constraint was not met, the value of the objective function received a penalty and was excluded from the optimization results.

Geothermal System
In this study, a vertical closed-loop geothermal system connected to the HST was applied. Because vertical closed-loop systems are commonly used in South Korea, due to the small land area [23], a vertical closed-loop geothermal system was introduced to the target buildings and optimized. In this study, the power load was stabilized, and the energy charge was reduced by using the HST with reference to the optimal design model for office buildings [12]. Figure 14 shows the vertical closed-loop geothermal system constructed in dynamic analysis simulation software (TRNSYS). Direct cooling was performed using the HP as a heat source, and heating was performed using the heat of the HST, after storing heat in the HST using the HP. stands for the present worth of annuity factor, whereas i represents PWAF, and n is the number of years.
In optimal design, setting constraints is important. In this study, constraints were set on the indoor temperature to prevent the groundless reduction of the values of the design variables. By referring to the ASHRAE Standard, unmet load hours were set to not exceed 300 h for the indoor temperature of the target buildings [22]. When this constraint was not met, the value of the objective function received a penalty and was excluded from the optimization results.

Geothermal System
In this study, a vertical closed-loop geothermal system connected to the HST was applied. Because vertical closed-loop systems are commonly used in South Korea, due to the small land area [23], a vertical closed-loop geothermal system was introduced to the target buildings and optimized. In this study, the power load was stabilized, and the energy charge was reduced by using the HST with reference to the optimal design model for office buildings [12]. Figure 14 shows the vertical closed-loop geothermal system constructed in dynamic analysis simulation software (TRNSYS). Direct cooling was performed using the HP as a heat source, and heating was performed using the heat of the HST, after storing heat in the HST using the HP.

System Performance Analysis
Performance analysis was conducted to analyze the adequacy of the optimized capacity of the geothermal system. After entering the optimally designed capacity into the geothermal system, the EWT and the coefficient of performance (COP) of the HP, during cooling and heating, were analyzed by monitoring the operation of the system for one year. EWT represents the temperature of the heat source entering the HP from the GHEX, and the COP of the HP was calculated by dividing the calorific value of the HP by its energy consumption. Equations (11) and (12) show the methods of calculating the COPs of the HP and the system.

System Performance Analysis
Performance analysis was conducted to analyze the adequacy of the optimized capacity of the geothermal system. After entering the optimally designed capacity into the geothermal system, the EWT and the coefficient of performance (COP) of the HP, during cooling and heating, were analyzed by monitoring the operation of the system for one year. EWT represents the temperature of the heat source entering the HP from the GHEX, and the COP of the HP was calculated by dividing the calorific value of the HP by its energy consumption. Equations (11) and (12) show the methods of calculating the COPs of the HP and the system.
COP System = Q Heatpump Energy Consumption system .
Figures 15-17 show the system performance factors according to the load pattern of each building. When compared with the performance factors of a conventionally designed system, the optimal design results were lower. This could be due to this study's focus on the cost of the geothermal system. When compared with the performance factors of a conventionally designed system, the optimal design results were lower. This could be due to this study's focus on the cost of the geothermal system.   When compared with the performance factors of a conventionally designed system, the optimal design results were lower. This could be due to this study's focus on the cost of the geothermal system.     As for the geothermal HP system performance factors of the hospital building, the average EWT increased by 11%, from 24.44 • C to 27.14 • C, and the average COP of the HP decreased by approximately 6%, from 6.74 to 6.33, during the cooling operation. The system COP decreased by approximately 5%, from 5.15 to 4.9. During the heating operation, the average EWT decreased by 2%, from 13.54 • C to 13.27 • C, and the average COP of the HP decreased by approximately 2%, from 3.78 to 3.72. The system COP decreased by approximately 3%, from 3.45 to 3.36. As for the apartment building, the performances of the geothermal HP system were significantly reduced during heating and cooling. This appears to be because the heating load was high for the apartment building, due to its load pattern, and the capacity of the HST was reduced. During the heating operation, the average EWT decreased by approximately 8%, and the average COP of the HP decreased by approximately 2% due to the optimal design. The system COP decreased by approximately 3%. During the cooling operation, the average EWT increased by approximately 5%. The average COP of the HP decreased by approximately 4%, and the system COP decreased by approximately 3%. During the cooling and heating operation of the school building, the average EWT decreased by 14% and increased by 4%, respectively. The average COP of HP decreased by approximately 8%, from 6.74 to 6.19, for cooling, and by 1%, from 3.79 to 3.76, for heating. The average system COP decreased by 7% and 2% for cooling and heating, respectively.

Optimization Results
When optimization was performed according to the load pattern of each building, the capacities of the system were optimally designed, as shown in Table 6. The optimization results were lower than the conventional investment costs for all load patterns, and slightly different optimization results were observed according to the load pattern. In the case of the apartment building, the capacity of the HP was lower than in the load patterns of the other buildings. Due to the cooling/heating operation characteristics of the apartment building, the heating load was relatively higher than the cooling load. The geothermal HP system, in this study, was designed to perform heating, after storing heat in the HST during the heating operation, and to allow the HP to directly respond to the cooling load during the cooling operation. This caused a difference in the system capacity reduction patterns of the apartment building with its higher heating loads compared to the school and hospital buildings.
In the case of the school and hospital buildings, the capacity of the HP was reduced by approximately 8% and 13%, respectively, and the capacity of the HST was reduced to the minimum value because the cooling load was relatively higher than the heating load. It appears that the capacity of the HP was reduced relatively slightly because the cooling load was relatively high for the school and hospital buildings, as mentioned above in Section 1.2. Figure 18 compares the total investment cost over 20 years according to the load pattern of each building. The initial investment cost includes the GHEX, HP, and HST, and the operating cost includes the cost of the power consumed during the operation of the geothermal HP system. In the case of the hospital, the initial investment cost was reduced by approximately 43% when using the optimal design compared to the conventional design. Due to the reduced capacities of the geothermal system, the operating cost over 20 years increased slightly. In the case of the apartment building, the initial investment cost decreased by approximately 33% compared to that of the conventional design, and the operating cost over 20 years decreased by approximately 4%. The operating cost over 20 years was lower because the operating cost during the heating period decreased due to the reduction in the capacity of the HST. In the case of the school building, the initial investment cost decreased by approximately 40% compared to the cost of the conventional design. The operating cost over 20 years increased by approximately 3%, due to the capacity reduction of the school building. When the cost was analyzed by adding the initial investment cost and the operating cost over 20 years, the cost was reduced by approximately 32% for the hospital building, 23% for the apartment building, and 29% for the school building.
Energies 2020, 12, x FOR PEER REVIEW 14 of 17 and the operating cost over 20 years decreased by approximately 4%. The operating cost over 20 years was lower because the operating cost during the heating period decreased due to the reduction in the capacity of the HST. In the case of the school building, the initial investment cost decreased by approximately 40% compared to the cost of the conventional design. The operating cost over 20 years increased by approximately 3%, due to the capacity reduction of the school building. When the cost was analyzed by adding the initial investment cost and the operating cost over 20 years, the cost was reduced by approximately 32% for the hospital building, 23% for the apartment building, and 29% for the school building.

Conclusions
Geothermal systems, which are temperature-difference energy-utilization technologies that promote energy saving through an efficient heat source supply, are attracting attention as highly efficient renewable energy systems. Their adoption, however, has been slow because they require a higher initial investment cost than other renewable energy systems. In this study, optimization software was used to create the optimal design of a geothermal system to reduce the initial investment cost of conventional design of a GSHP system. The particle swarm optimization (PSO) algorithm was used, which has the benefits of fast optimization analysis and the slim possibility of reaching local optimization. In this study, the optimal design results according to the load patterns of buildings were compared and analyzed. A hospital, a school, and an apartment building were set as target buildings. The results of this study are as follows:

Conclusions
Geothermal systems, which are temperature-difference energy-utilization technologies that promote energy saving through an efficient heat source supply, are attracting attention as highly efficient renewable energy systems. Their adoption, however, has been slow because they require a higher initial investment cost than other renewable energy systems. In this study, optimization software was used to create the optimal design of a geothermal system to reduce the initial investment cost of conventional design of a GSHP system. The particle swarm optimization (PSO) algorithm was used, which has the benefits of fast optimization analysis and the slim possibility of reaching local optimization. In this study, the optimal design results according to the load patterns of buildings were compared and analyzed. A hospital, a school, and an apartment building were set as target buildings. The results of this study are as follows: • The analysis of daily cooling/heating load patterns showed that an optimal design could significantly reduce the capacity of the heat storage tank (HST) and could reduce the capacity of the heat pump (HP) to a value similar to the cooling peak load when the cooling load was high. When the heating load was high, the optimal design could significantly reduce the capacity of the HP and slightly reduce the capacity of the HST.

•
The average entering water temperature (EWT) of the geothermal HP system increased by 6-11% during cooling and decreased by 2-8% during heating. The average coefficient of performance (COP) of the HP decreased by 4-6% during the cooling operation and by approximately 2% during the heating operation. The average system COP decreased by 3-4% during cooling and by approximately 3% during heating. The performance factors of the geothermal HP system were reduced because this study was conducted with a focus on the cost of the system.

•
The optimization results showed that the total investment cost over 20 years was lower for all the building types. The cost was reduced by approximately 32% for the hospital building, 23% for the apartment building, and 29% for the school building.

•
It was confirmed that the design of the capacity of the HST does not significantly affect the annual operating cost for buildings with high cooling loads, but it is important for the optimal design of buildings with high heating loads.

•
For buildings that use a large amount of energy, such as the building types used in this study, economical design appears to be possible.

•
Further research should be conducted on the optimization of the geothermal system considering the performance of the system in terms of the flow rate and EWT.