1 Introduction

Energy, as one of the most important survival elements, has always been considered by researchers and engineers [1,2,3]. On the other hand, the factors such as population growth, urban sprawl, industrial developments and the rise of emerging technologies have changed the energy consumption patterns [4, 5]. In addition, the depletion of energy resources such as fossil fuels and increase in greenhouse gas emissions have led scientists and researchers to look for ways to increase the efficiency of energy systems like using the renewable energy sources to replace them with fossil fuel sources [6,7,8]. With about 40% of total energy consumption, the construction industry has the major share of energy consumption in the world [6]. Therefore, the energy consumption can be significantly reduced by optimization of different parts of the buildings, and consequently, the emissions of pollutants and greenhouse gases reduce [9, 10].

One of the most important ways to optimize the energy consumption in buildings is to insulate and reduce the amount of heat transfer between the inside and outside of the building. The studies show that the insulation of building walls has a great impact on energy consumption reduction in different buildings. There are different methods for insulation of different parts of the building. The use of phase change materials (PCM) is one of the proper insulation methods that have been considered in recent years [11,12,13,14]. Due to the high heat capacity and low heat transfer coefficient of PCMs, they can effectively reduce heat loss in buildings. PCMs change phase, absorb or release the heat at a nearly constant temperature and store the thermal energy [15]. Therefore, they can be used to stabilize the indoor temperature fluctuations [16,17,18]. Besides, PCM allows to ensure an effective night cooling and presents a potentially feasible technology for building retrofit [19, 20].

In recent years, due to the importance of PCM in energy storage, many studies have been conducted in this field. Fateh et al. [11] experimentally and numerically investigated the position of PCMs in different layers of the wall and concluded that 15% reduction in energy consumption is obtained when PCMs are located in the middle of the wall. Park et al. [21] investigated the optimization of PCM applied to glass curtain wall building (GCW) and to evaluate building energy performance by EnergyPlus. For modeling, was selected from ASHRAE Standard 90.1–2013 prototype buildings, and three locations of climate data (Miami, Baltimore and Duluth) were used. The simulation results showed that PCM with melting temperature of 25° C is the most suitable PCM for this type of buildings. Kishore et al. [22] examined the effect of various PCM parameters on thermal performance and load modulation capacity of the PCM-integrated lightweight building walls in Phoenix and Las Vegas. The results show that the optimized PCM proposed can invert the transient heat gain profile of the wall, providing up to 70% reduction of wall-related heat gain during peak hours without a major increase in the cumulative heat gain. Jin et al. [23] investigated the effect of PCM location on thermal performance of wall and identified the most optimal location of PCM. Experimental results showed that the optimal location of the PCM thermal shield is one-fifth of the insulation cavity from the internal surface of the wall where 41% thermal energy saving is approximately obtained. The thermal effect of PCM on a multilayer building envelope integrating hemp lime concrete (HLC) was investigated at experimental level by Wu et al. [24]. Four envelope configurations including a reference (without PCM) and three configurations with PCM (PCM located on the outside and inside, in the middle of the envelope) were investigated to study the effect of PCM and its position on the envelope hydrothermal behavior. The results showed that the closer the PCM is to the outside space, the greater the heat store/release capacity and the lower the heating/cooling load from the envelope to the interior. Tuncbilek et al. [25] investigated the optimum location, quantity and fusion temperature of PCM incorporated into a conventional building brick under the climatic conditions of Marmara region of Turkey in terms of energy saving. The outcomes suggest that the integration of PCM with optimum fusion temperature into the brick can reduce heating and cooling loads considerably in every season of the year and provide thermal comfort for the occupants. The effect of PCM on thermal performance of double-glazing unit was numerically studied by Li et al. [26]. In addition to conductive and convective heat transfer, they also considered the radiative heat transfer mechanism. Their results showed that PCM properties play an important role in heat transfer between indoor room and outdoor space. The effect of PCM’s refractive index on heat transfer between indoor and outdoor is weak while the effect of PCM’s extinction coefficient is strong. Xiao et al. [27] studied the use of PCM-TWS (Trombe wall) for improving energy efficiency in buildings in China. Their results showed that the use of PCM-TWS can reduce the heat load by 71.53% during the heating season. The payback period for investment ranges from 6.56 to 11.18 years. Meng et al. [28] proposed a new type of high-reflectivity PCM roof to reduce the building heat gain through the roof. They examined three rooms of the same size with three types of PCM roof, reflectivity roof and common roof. The thermal protection performance of these three roofs was compared for eight days (July 23–July 30). The PCM roof and the high-reflectivity roof were then combined. The high-reflectivity PCM roof was compared with the common roof for another eight days (August 17 to August 24). The results showed that the high-reflectivity PCM roof had better thermal protection performance than the other three roofs. The thermal performance of walls containing PCM-foamed cement in building in five different climate zones in China was investigated by Qing et al. [29]. They demonstrated that the PCM-foamed cement balanced the indoor and outdoor temperature differences in all 5 climate zones. The energy saving rates are 37.02% (Kunming), 20.17% (Beijing), 22.26% (Shanghai) and 15.87% (Shenzhen). The shortest payback period is 5.95 years in Harbin. Labihi et al. [30] theoretically and experimentally studied the effect of loading on a phase change material on an air cavity. For the air, they used a cubic cavity of 10 cm × 10 cm × 10 cm and for the PCM a cavity with a thickness of 1 cm. They proposed an effective density, which reduces the standard deviation between experimental and numerical results from 2 to 0.66 and 1.4 to 0.74 for the PCM and the air, respectively. Izadi et al. [31] theoretically investigated the effect combination three PCMs (RT15, RT18 and RT22) in two hollow brick types in Iran for Keeping the interior of a shelter warm in cold weather. Several combinations of PCM with air layers were investigated to evaluate the best method for placing the air and PCM layers. Based on the results, the RT18 PCM-filled brick can present lower heat fluxes than the hollow one. Also, they showed that RT22 PCM-filled brick can provide 66.79% lower average heat flux compared to the hollow brick for the first 24 h of the process.

The economic performance of the three cooling systems including the thermally active building system (TABS), the PCM panel system and a variable air volume (VAV) system was compared in an open-plan office with 3, 6, 12, 18 and 24 occupants by Boccardo et al. [32]. The results showed that TABS is cheaper than the other two systems and the PCM panels are the most expensive system. Although the TABS is cheapest, it is not suitable when cooling loads are high. Yanga et al. [33] experimentally investigated the thermal performance of PCM in lightweight wallboards. Thermal comparisons of the arrangement of different PCM layers were made. Experimental results showed that lightweight wallboards with PCM layer arrangement on the interior surface can reduce the amplitude of temperature fluctuation by 32.4% and delay the lag time from 2.9 h to 4.1 h compared to the arrangement on the exterior surface. Eisapour et al. [34] numerically investigated the optimum design of double elliptical latent heat storage units during the charging process. They concluded that the best performance is found when the outer and inner tubes are oriented horizontally and vertically, respectively. Also, their results showed that implementation of double wavy inner pipes improves the heat transfer surface area, which accelerates the melting time by 2.17. The rate of energy delivered to the PCM using double wavy inner tubes is 218.75 W/kg, compared to 180.4 W/kg using straight double inner tubes. Jin et al. [35] estimated the optimal PCM location in building walls under Nanjing (China) weather conditions. It was found that when the phase change temperature range of PCM was 26–28 °C, the optimal PCM locations in Nanjing for spring, summer, autumn, winter and a whole year were 8/16, 2/16, 5/16,8/16 and 4/16 L, respectively. Alawadhi [36] examined the thermal analysis of a proposed brick–PCM system as bricks with cylindrical holes filled with PCM, using two-dimensional finite element method. In this simulation, the effect of different design parameters like quantity, type and location of PCM was investigated and it was shown that n-eicosane has the best thermal performance compared to other types of PCM. In addition, it was found that if three PCM cylinders are placed at the centerline, 17.55% reduction in indoor heat exchange can be achieved. A numerical study has been investigated the effect of fin size and number on the solidification output of a double‐tube container filled with PCM by Bahlekeh et al. [37]. They found that for the same fin length and initial boundary conditions, the solidification rate increases by 67%, 170%, 308% and 370% for cases with 4, 9, 15 and 19 fins. Also, they showed that moving from Reynolds numbers 500 to 1000 and 2000 improved heat recovery rates by 14.4% and 27.9%, respectively, and decreased discharging times by 12.9% and 22%. Rashed et al. [38] used numerical simulations to investigate the heat exchange reduction through adding a 20-mm-thick PCM layer to the vertical walls and roof of a room located in the Kuwaiti city during summer. They concluded that the addition of PCM of RT42 to roof leads to heat gain reduction of 15.37% while it reduces by approximately 13.78% for vertical walls, indicating that geographical direction has no significant impact on effectiveness of PCM. Moreover, the evaluation of the melting temperature effects of three PCMs including RT31 (phase change temperature of 27–33 °C), RT35 (29–36 °C and RT42 (38–43 °C) on heat transfer showed that the effectiveness of RT31 is better than other types of PCMs. The thermal performance of PCM used in the roof space of a residential attic in Turin of Italy was numerically and experimentally investigated by Elarga et al. [39]. The roof of the attic, which was studied in summer weather conditions, was divided into three parts: The first part of the roof was without PCMs while two types of PCMs with different melting/solidification temperatures were used in other two parts of the roof. Results indicated that PCM increases the thermal performance and reduces the heat peak load by 13% to 59%, based on the type of PCM. A numerical study has been investigated the potential energy and thermal comfort benefits of integrating PCM into an external wall of an intermittently cooled office by Tuncbilek et al. [40]. It is advisable to locate the PCM layer near the interior. Also, energy savings of up to 12.8% were attained for the PCM layer thickness of 23 mm as compared to a wall without any PCM.

Kishore et al. [41] numerically simulated the effect of integrating PCM layer into building walls on energy saving potential in five US cities with different climatic conditions. The results showed that PCM has significant impacts in heat gain reduction during cooling season while it is not effective in reducing heat losses during heating season. Furthermore, based on the climate zone, the optimal PCM-integrated building walls can annually reduce the heat gain by 3.5–47.2% in the USA. The lighting performance of the lazed roofs is better, and they are extensively used in modern architecture. However, the thermal insulation performance of the glazed roofs is poor and reduces the indoor thermal comfort. Mao et al. [42] studied the injection of PCM into middle layer of a building’s glazed roof aimed at indoor thermal condition improvement and energy consumption reduction under climate conditions of Wuhan in China. They optimized the roof design in terms of roof angle, PCM thickness, glazing thickness, PCM melting temperature and PCM latent heat during summer and winter. It was shown that the proper melting temperature of the PCM layer is 26–30 °C. In addition, they found that the thermal insulation performance of the double-slope PCM glazed roof can be enhanced by increasing the PCM layer and glazing layer thickness.

As reviewed in the literature about the use of PCM in buildings, it is observed that the location and thickness of PCM layer inside the building wall have not yet been addressed at the same time. For this purpose, the present study investigates the optimal location and thickness of the PCM layer inside the wall of an educational building located in Sabzevar city with dry–hot climate type. Accordingly, the five-layer wall of the educational building is simulated through one-dimensional numerical modeling using finite difference method and explicit solution. At first, the optimal location of PCM inside the wall is determined, and then, different thicknesses of PCM layer are examined. Finally, the amount of energy saving and the payback period for different PCM thicknesses are calculated based on thermo-economic analysis and the optimal PCM thickness is obtained using Pareto solutions.

2 Case study and problem description

The case study in this research is a three-story office building in Hakim Sabzevari University, Sabzevar, Iran. The hot and dry city of Sabzevar has a latitude and longitude of 36.2152°N and 57.6678°E, respectively. It is situated at an altitude of 941 m above the mean sea level and its standard pressure is 90.5 kPa. Detailed information about the monthly variations of temperature in Sabzevar city throughout the year is extracted from Iran Meteorological Organization. Figure 1 shows the satellite view and exterior view of the building. The studied building has a total built-up area of about 1452 m, and the area of its side walls is around 268 m2.

Fig. 1
figure 1

Satellite view and exterior view of the office building in this study

Figure 2 illustrates a schematic view of the PCM-integrated wall in current study. As shown, from outside to inside, the wall is composed of a granite layer, cement mixture layer, PCM layer, brick and gypsum layer, respectively. In addition, the building wall is evaluated for three cases of without PCM, integrated with PCM before the brick layer and integrated with PCM after the brick layer with different thicknesses.

Fig. 2
figure 2

Schematic view of wall layers a without PCM, b with PCM placed before brick layer and c with PCM placed after brick layer

The total thickness of PCM-integrated wall is assumed to be the constant value of 310 cm. The thickness and thermo-physical properties of wall layers are listed in Table 1.

Table 1 Relevant thermo-physical properties of wall layers

The following assumptions are made for numerical simulation:

  • The heat transfer inside the wall is considered unsteady and one-dimensional.

  • The materials of wall layers are considered isotropic.

  • The properties of wall materials are not temperature-dependent except PCM layer.

  • The convective heat transfer inside PCM layer during melting is not considered.

  • The radiative heat transfer of building wall is assumed negligible.

3 Governing equations

According to the above assumptions, the unsteady conduction heat transfer equation for non-PCM layers and PCM layer is written as Eqs. (1) and (2), respectively:

$$ \left( {\rho C} \right)_{b} \frac{{\delta T_{b} }}{\delta t} = K_{b} \frac{{\partial^{2} T_{b} }}{{\partial x^{2} }} $$
(1)
$$ \left( {\rho C} \right)_{{\text{P}}} \frac{{\delta T_{{\text{P}}} }}{\delta t} = K_{{\text{P}}} \frac{{\partial^{2} T_{{\text{P}}} }}{{\partial x^{2} }} $$
(2)

where \(\rho_{b}\), \(C_{b}\), \(K_{b}\) and \(T_{b}\) are density, specific heat capacity, heat transfer coefficient and temperature for non-PCM layers, respectively. Moreover, \(\rho_{{\text{P}}}\), \(C_{{\text{P}}}\), \(K_{{\text{P}}}\) and \(T_{{\text{P}}}\) are density, specific heat capacity, heat transfer coefficient and temperature for PCM layer, respectively.

The PCM layer is highly temperature-dependent. As a result, the specific heat capacity of PCM layer is also temperature-dependent which is obtained from the following equation [36]:

$$ \left( {\rho C} \right)_{p} = \left\{ {\begin{array}{*{20}l} { \left( {\rho C} \right)_{{{\text{solid}}}} } \hfill & {T < T_{{{\text{m}} }} } \hfill \\ {\frac{{\left( {\rho C} \right)_{{{\text{solid}}}} + \left( {\rho C} \right)_{{{\text{liquid}}}} }}{2} + \frac{{\rho_{{{\text{solid}}}} + \rho_{{{\text{liquid}}}} }}{2} \left( {\frac{B}{\Delta T}} \right)} \hfill & {T_{{\text{m}}} < T < T_{{\text{m}}} + \Delta T} \hfill \\ { \left( {\rho C} \right)_{{{\text{liquid}}}} } \hfill & {T > T_{{\text{m}}} + \Delta T} \hfill \\ \end{array} } \right. $$
(3)

In the above equation, \(B\) is the latent heat of PCM layer, \(T_{{\text{m}}}\) is the melting temperature of PCM layer, \(\Delta T\) is the phase change temperature range of PCM layer, \(\rho_{{{\text{liquid}}}}\) is the density of liquid phase PCM and \(\rho_{{{\text{solid}}}}\) is the density of solid phase PCM.

3.1 Numerical modeling and boundary conditions

To solve the unsteady conduction heat transfer equation, there are different numerical methods such as finite volume method, finite difference method and finite element method. In this study, like most researches [26, 39, 45, 46], the finite difference method and explicit solution is used to investigate the impact of PCM in external building wall. A one-dimensional heat transfer model was implemented in MATLAB R2017b.

Since the external wall is in contact with outside air, the boundary condition for external wall surface at x = 0.0 can be expressed as:

$$ - K_{{\text{g}}} \frac{{\partial T_{{\text{g}}} }}{\partial x} = h_{{\text{o}}} \left( {T_{{{\text{out}}}} - T_{{{\text{so}}}} } \right) $$
(4)

where \(K_{{\text{g}}}\) is the conduction heat transfer coefficient of granite stone, \(T_{{\text{g}}}\) is the temperature of granite layer, \(h_{{\text{o}}}\) is the convection heat transfer coefficient of outside air, \(T_{{\text{o}}}\) is the temperature of outside air and \(T_{{{\text{so}}}}\) is the external surface temperature of granite layer.

In addition, the boundary condition for internal wall surface at x = L can be written as:

$$ - K_{{{\text{pla}}}} \frac{{\partial T_{{{\text{pla}}}} }}{\partial x} = h_{{\text{i}}} \left( {T_{{{\text{in}}}} - T_{{{\text{io}}}} } \right) $$
(5)

where \(K_{{{\text{pla}}}}\) is the conduction heat transfer coefficient of plaster, \(T_{{{\text{pla}}}}\) is the temperature of plaster layer, \(h_{{\text{i}}}\) is the convection heat transfer coefficient of indoor air, \(T_{{\text{i}}}\) is the temperature of indoor air and \(T_{{{\text{io}}}}\) is the outdoor surface temperature of plaster layer.

The finite difference method and explicit solution are used to solve the equations numerically. The external wall is subjected to a forced convection with heat transfer coefficient of \(h_{{\text{o}}} = 15\frac{W}{{m^{ \circ } {\text{C}}}}\) at monthly variable temperature. The internal wall is subjected to a free convection with heat transfer coefficient of \(h_{{\text{i}}} = 8\frac{W}{{m^{ \circ } {\text{C}}}}\) at temperature of \(T_{{{\text{in}}}} = 18\;^{ \circ } {\text{C}}\) [11].

Since the building’s outside temperature (\(T_{{{\text{out}}}}\)) varies during a day, a sinusoidal profile is used for temperature variations which is obtained based on maximum temperature (\(T_{\max }\)) and minimum temperature (\(T_{\min }\)) of outside air during day [11].

$$ T_{{{\text{out}}}} = T_{2} + T_{1} \sin \left( {\frac{2\pi }{{24}}\left( {\frac{t}{3600} - 6} \right)} \right) \circ {\text{C}} $$
(6)

In the above equation, \(t\) is temperature, \(T_{1}\) and \(T_{2}\) are equal to \(T_{1} = \frac{{T_{\max } - T_{\min } }}{2}\) and \(T_{2} = \frac{{T_{\max } + T_{\min } }}{2}\), respectively.

Equation (7) is used to calculate the heat exchange reduction per unit area as follows:

$$ {\text{q}}_{{{\text{red}}}} = q_{{{\text{without }}\;{\text{ PCM}}}} - q_{{{\text{PCM}}}} $$
(7)

where \(q_{{{\text{without }}\;{\text{PCM}}}}\) and \(q_{{{\text{PCM}}}}\) are amount of heat transfer per unit area without and with PCM layer, respectively. In addition, \(q_{{{\text{red}}}}\) is amount of heat exchange reduction per unit area due to use of PCM layer.

4 Validation

The experimental results reported by Fateh et al. [11] are used to validate the results obtained from numerical modeling in this study. They considered a PCM-integrated wall with indoor temperature of \(T_{{{\text{in}}}} = 18\;^{ \circ } {\text{C}}\) while a sinusoidal profile (Eq. 6) with maximum temperature of \(T_{\max } = 26.5\;^{ \circ } {\text{C}}\) and minimum temperature of \(T_{\min } = 12.5\;^{ \circ } {\text{C}}\) was used for outdoor temperature. Figure 3 shows the comparison of numerical results of the present study and experimental results of Fateh et al. [11]. As it is seen, there is a good agreement between numerical and experimental results with an acceptable maximum error of 7.9%. This is because Fateh et al. [11] used a plot for variations of PCM specific heat capacity with temperature while in this study, a quadratic equation is used for heat capacity of PCM layer as a function of temperature.

Fig. 3
figure 3

Comparison of numerical results in the present study with experimental results reported by Fateh et al. [11]

5 Results and discussion

5.1 Optimal location of PCM layer in the wall

At first, it is necessary to determine the appropriate location of the PCM layer inside the wall. As shown in Fig. 2, the PCM layer is placed at two locations: Case 1 = Before the brick layer and Case 2 = After the brick layer. The total thickness of building wall is 31 cm and the thickness of PCM and brick layer are considered is 3 cm and 22 cm, respectively. The thickness of the other layers is equal to 2 cm, as listed in Table 1. The indoor temperature of the building is \(T_{{{\text{in}}}} = 18\;^{ \circ } {\text{C}}\) while the outdoor temperature is considered as a sinusoidal equation (Eq. 6) with maximum and minimum temperature of \(T_{\max } = 39\;^{ \circ } {\text{C}}\) and \(T_{\min } = 14\;^{ \circ } {\text{C}}\), respectively.

Figure 4a shows that when the PCM layer is placed before the brick layer, the variations of temperature are well controlled and the temperature reaches to its minimum value in the brick layer which indicates the heat exchange reduction. However, as shown in Fig. 4b, when the PCM layer is placed after the brick layer, the temperature is not controlled properly and its variations are higher than the first case which leads to more heat transfer within wall.

Fig. 4
figure 4

Variations of temperature in different layers of the wall during the second day a when PCM layer is placed before the brick layer and b when PCM layer is placed after the brick layer

Furthermore, Fig. 5 shows that when the PCM layer is placed after the brick layer, the decrease in temperature is less compared to the case when PCM layer is placed before the brick layer. It is seen that the temperature significantly decreases in case 2 and consequently, there will be high heat exchange reduction within the wall. Therefore, it is concluded that the optimal location of the PCM layer is before the brick layer.

Fig. 5
figure 5

Variations of temperature within entire wall for the two cases

5.2 Effect of PCM thickness and outside temperature

As discussed, it is found that the optimal location of PCM layer is before the brick layer in the building wall. The range of outdoor and indoor temperatures is very important in selecting the type of PCM. PCM type should be selected in a way that its melting and freezing temperatures are within the range of indoor and outdoor temperatures. In other words, since the inside room temperature is between 18 and 22 °C, the selection of PCM type is mostly based on the outdoor temperature. Therefore, in this section, due to the importance of outdoor temperature, the thickness of PCM layer and variations of outdoor temperature are investigated. In this regard, the modeling is performed for two PCM thicknesses of 3 and 5 cm at constant outdoor temperatures of 30, 35, 40 and 45 °C.

Figure 6a, b demonstrates the variations of temperature within entire wall for two different thicknesses of the PCM layers at different outdoor temperatures. In addition, the variations of temperature within entire wall with PCM layer and without PCM layer are compared in Fig. 7 at a constant outdoor temperature of 35 °C. Figures 6 and 7 show that the with the increase in the thickness of PCM layer, the rate of temperature reduction within the wall increases. Therefore, the heat transfer across the wall with 5-cm-thick PCM layer is lower than the wall with 3-cm-thick PCM layer. Although heat transfer is lower in this case, it should be noted that it is not economically viable due to the high cost of PCM. Therefore, in the next part, the PCM layer with different thicknesses is examined, and according to the economic analysis, the optimal amount of PCM thickness is selected. Although the heat transfer reduces with thicker PCM layer, the high cost of PCMs should also be taken into account from an economic viewpoint. Hence, in the next section, different PCM thickness are investigated and the optimal thickness of PCM layer is determined based on economic analysis.

Fig. 6
figure 6

Variations of temperature within entire wall a with 3-cm-thick PCM layer and b with 5-cm-thick PCM layer at different outdoor temperatures

Fig. 7
figure 7

Variations of temperature within entire wall without PCM layer at constant outdoor temperature of 35 °C

5.3 Optimal thickness of PCM layer

In this section, the amount of heat loss and energy saving during hot months of the year is calculated for the studied educational building, and then, the optimal thickness of PCM layer is obtained based on the PCM cost. For this purpose, according to the weather data obtained for temperature of Sabzevar city in the hot months of the year, the average values of \(T_{\max }\) and \(T_{\min }\) are calculated. Then, the amount of outdoor temperature \(T_{{{\text{out}}}}\) is determined using Eq. 6, as a sinusoidal function. Accordingly, the average value of \(T_{\max }\) and \(T_{\min }\) during the effective days of the six hot months of the year is summarized in Table 2.

Table 2 Average value of \(T_{\max }\) and \(T_{\min }\) during the effective days of the six hot months of the year in Sabzevar city

The amount of heat transfer and energy saving for PCM thicknesses of 2, 3, 4 and 5 cm is obtained in different months. Figure 8 shows the amount of heat transfer per unit area of the building wall for different PCM thicknesses from May to October. As known, with the increase in the thermal insulation, the amount of heat transfer across the wall decreases. Therefore, when the thickness of PCM layer increases from 2 to 5 cm, the reduction in heat transfer per unit area of the wall is seen. Furthermore, due to the weather conditions in July, the maximum heat flux within the building wall is observed at this month. The amount of heat exchange reduction per unit area of the building wall for different PCM thicknesses is illustrated in Fig. 9 from May to October. According to Eq. (7), given a constant \(q_{{{\text{without}}\;{\text{PCM}}}}\) in each month, the amount of heat exchange reduction increases with the decrease in \(q_{{{\text{PCM}}}}\). Therefore, since the amount of heat transfer inside the wall with 5-cm-thick PCM is lowest, the maximum heat exchange reduction in each month is related to the wall with 5-cm-thick PCM. However, economic considerations may be taken into account when PCM layers with high thickness is used.

Fig. 8
figure 8

Amount of heat flux for different PCM thicknesses from May to October

Fig. 9
figure 9

Amount of heat exchange reduction per unit area for different PCM thicknesses from May to October

Given the area of the side walls of the office building equal to 268 m2, the total amount of heat exchange reduction during six hot months is depicted in Fig. 10 for different PCM thicknesses. As it can be seen, the total amount of heat exchange reduction increases with the increase in the PCM thickness. The total amount of heat exchange reduction for the wall with 5-cm-thick PCM layer is 678 MW while it becomes equal to 325 MW for the wall with 2-cm-thick PCM layer. Comparison of the results obtained for building wall with PCM layer and without PCM layer indicates that the ratio of heat exchange reduction using PCM layer with thickness of 2, 3, 4 and 5 cm is equal to 9.8%, 13.4%, 17.5% and 20.4%, respectively.

Fig. 10
figure 10

Total amount of heat exchange reduction in building walls during six hot months for different PCM thicknesses

In order to find the optimal thickness of the PCM layer, it is necessary to calculate the PCM cost and electricity saving cost for each PCM thickness. The cost of PCM is equal to 9.133 $/kg [47,48,49,50]. Moreover, a refrigeration system with cooling capacity of 24,000 BTU/h or 7 kW (2 refrigeration ton [51]) is assumed to calculate the amount of electricity saving due to heat exchange reduction in case of using PCM layer inside the building walls. Accordingly, considering the price of electricity equal to 0.1 $/kWh, the electricity saving cost is computed by multiplying the amount of electricity saving in terms of kWh by electricity price.

Figure 11 shows the cost of PCM and cost of electricity saving in the building for different PCM thicknesses. As seen, with the increase in the PCM thickness, although the electricity saving cost increases the cost of PCM also increases significantly. As a result, the optimization method is required to find the optimal thickness of the PCM layer.

Fig. 11
figure 11

PCM cost and electricity saving cost for different PCM thicknesses

According to the cost of PCM and cost of electricity saving, the amount of payback period can be calculated for each PCM thickness. Figure 12 demonstrates the payback period for different PCM thicknesses. As shown, it is seen that with the increase in the thickness of PCM, the amount of payback period increases due to the higher cost of PCM compared to electricity saving cost. The payback period of 5-cm-thick PCM layer is about 56 months while the payback period of 2-cm-thick PCM layer is around 47 months.

Fig. 12
figure 12

Amount of payback period for different PCM thicknesses

As shown in Fig. 11, with the increase in the thickness of the PCM layer, the electricity saving cost increases. But, on the other hand, the cost of PCM also increases with the increase in the PCM thickness. Therefore, Pareto-based multi-objective optimization technique is applied to find the possible solutions, and then, the TOPSIS method is used to find the optimal point. The optimal point has the shortest distance from the ideal point and the longest distance from the non-ideal point. In this study, the ideal point is the maximum electricity saving cost and minimum PCM cost while the minimum electricity saving cost and maximum PCM cost is considered as non-ideal point. The results obtained from multi-objective optimization are illustrated as Pareto front curve in Fig. 13. According to TOPSIS method, the optimal point for PCM thickness is obtained equal to 2.9 cm (≈ 3 cm).

Fig. 13
figure 13

Optimal solutions obtained from multi-objective optimization as Pareto front curve

The payback period in case of using 3-cm-thick PCM layer inside the building walls is around 50 months, as shown in Fig. 12. The other results obtained for PCM layer with optimal thickness of 3 cm are presented in Table 3.

Table 3 Thermo-economic results of PCM-integrated walls with optimal PCM thickness of 3 cm

6 Conclusions

In this study, the feasibility of using PCM layer inside the walls of an educational building in Hakim Sabzevari University is numerically investigated to reduce the heat transfer across the building walls during six hot months of the year. The experimental results reported by Fateh et al. [4] are used to validate the results obtained from numerical modeling. There is a good agreement between numerical and experimental results with an acceptable maximum error of 7.9%. At first, the numerical simulation is used to find optimal location of PCM layer inside the wall for minimum heat transfer. Then, the effects of outdoor temperature on thermal performance of the PCM-integrated wall is examined for two different PCM thicknesses. In addition, the amount of heat exchange reduction for different PCM thicknesses is obtained from May to October. The main results can be summarized as follows:

  • It is concluded that the optimal location of the PCM layer is before the brick layer.

    • The amount of heat exchange reduction increases with the increase in the thickness of PCM layer; therefore, the maximum heat exchange reduction in each month is related to the wall with 5-cm-thick PCM.

  • Due to the weather conditions in July, the maximum heat flux within the building wall is observed at this month.

    • It is found that the ratio of heat exchange reduction using PCM layer with thickness of 2, 3, 4 and 5 cm is equal to 9.8%, 13.4%, 17.5% and 20.4%, respectively.

  • It is concluded that although the heat transfer reduction and associated electricity saving cost increases with the increase in the PCM thickness, the cost of PCM also increases. Finally, using Pareto-based multi-objective optimization and TOPSIS method, an optimal PCM thickness of about 3 cm is obtained which leads to a payback period of 50 months.