1. Introduction
Energy costs are increasing and represent a large proportion of household budgets. These can be limited by reducing the energy consumed in heating the building. This can be achieved, among others, by improving the thermal insulation of the building envelope. New buildings must meet the standard requirements for heat transfer coefficients. Currently, in the countries of central and northern Europe, these coefficients are very low, so such buildings will consume a small amount of heat.
Research in this field is largely focused on the search for optimal solutions for the structure of the building body. Various objective functions are analyzed here. In the article by Ascione et al. [
1], the parameters of thermal insulation layers of the external partitions of a multi-family building were optimized. Thermal simulations using the EnergyPlus program and the optimization process with the NSGA-II (Non-dominated Sorting Genetic) algorithm were carried out. The objective functions were to minimize the primary energy demand and discomfort hours. These studies were carried out for two climate data sets from the Mediterranean area. The same authors [
2] extended their research to search for the best energy supply systems based on renewable sources for the same building. Similar research consisting of the envelope for a single-family building, but in a moderate transitional climate, was carried out by Grygierek and Ferdyn-Grygierek [
3,
4,
5]. In article [
3], the life cycle cost (LCC) was optimized, where window area, types of glazing, the thickness of insulation and azimuth of the buildings were the design variables. This research was carried out for the building with and without mechanical cooling. In [
4], the benefits of using passive cooling to maintain thermal comfort for the same building were discussed. A fuzzy logic controller to operate the fans was proposed and optimized. The optimal solutions of the building body for a natural ventilation case, taking into account the windows being opened by the residents, were examined in article [
5]. Additionally, the behavior of residents in controlling the ventilation of the building was optimized. The objective functions in this study were LCC and the thermal discomfort hours.
In well-insulated buildings, the problem of overheating can occur in summer periods. Such a building heats up more slowly, but if it gets very hot, it is more difficult to cool it down, for example, at night. In buildings with mechanical cooling systems, such a situation results in an increased demand for cooling [
1]; in buildings with natural ventilation this results in deterioration of thermal comfort [
5]. In an effort to reduce this undesirable effect and seek optimal solutions, analysts very often adopt thermal comfort as one of the objective functions [
1,
6]. The problem of buildings overheating with increasing demand for cooling will increase with the warming climate [
7].
In most studies, infiltration airflow is assumed to be constant, and its minimum value is adopted according to standard guidelines [
8]. Adopting a constant air change rate (ACH) in naturally ventilated buildings is a large simplification that can affect the results. In buildings with natural ventilation, it is impossible to meet the standard requirements (approximately ACH = 0.5 h
−1) without opening windows [
9]. In practice, in cold periods, residents do not open windows. From the point of view of energy consumption, such an action is right. This was confirmed in the study by Ferdyn-Grygierek and Grygierek [
3], in which the value of the infiltrating airflow due to the heat demand was optimized; the best result (minimum heating demand) was obtained for the minimum value of air change rate in the building. However, excessive airflow limitation can have undesirable effects. These may be the development of fungi and molds as a result of an increase in air humidity in the building. Such conditions can be dangerous to the health of residents. These undesirable effects occur especially in older, retrofitted buildings with damp exterior walls.
Another undesirable effect of reducing ventilation air is increased CO
2 concentration in the building. The concentration of this gas is a good parameter for describing indoor air quality [
10]. In buildings, people are the main source of CO
2. Franco et al. [
11] discussed the correlation between the concentration of CO
2 in the indoor air and the number of occupants in the room. Furthermore, research [
12] clearly shows the relationship between CO
2 concentration and the health symptoms that occur in people. These can be fatigue, eye, nose, headache and respiratory symptoms. In addition, significant decreases in decision-making performance were observed at relatively low CO
2 concentrations (around 1000 ppm) [
10,
13]. Providing the right amount of fresh air to the room solves the problem of high concentrations of CO
2. However, such solutions can cause an unfavorable increase in energy demand, which has been confirmed by researchers. For example, Tihana et al. [
14] simulated various ventilation scenarios on a single-family house in Latvia. Annual energy consumption, indoor quality and thermal comfort were analyzed. Regular opening of windows daily from June to September reduced CO
2 concentration (more than 8%) but significantly increased energy consumption. The installation of a mechanical ventilation system reduced energy consumption by 7% and improved air quality by 50%, but the payback period was too long. The study by Cakyova et al. [
15] focused on the analysis of various passive ventilation strategies to reduce CO
2 concentration in the residential building in Cyprus, preventing the risk of overheating and thus ensuring a high-quality level of the indoor environment. An ideal scenario was achieved considering night ventilation through window openings where the indoor CO
2 concentration never exceeded the limit of 1000 ppm during the summer design week. In other studies, researchers [
16,
17,
18] consequently seek effective methods to control ventilation, heating, and cooling systems based on deep learning, the objective of which is to provide indoor air quality with low energy consumption. In the case of ventilation systems, exhaust air heat recovery systems can reduce energy demand [
19]. Another method of saving energy in ventilation is to use ground-to-air heat exchangers to heat the ventilation air in winter and cool it in summer [
20,
21,
22]. Decentralized systems, whose operation can be adapted to the current needs of occupants (temperature sensors, air pollution sensors), can also result in significant energy reduction in buildings [
23,
24,
25].
Recent studies [
26,
27] also show that maintaining appropriate indoor environment quality is critical to minimize the spread of the SARS-CoV-2 virus. However, most ventilation systems have limitations in maintaining thermal comfort, indoor environment quality, and energy balance at the same time. Thus, there is a need to develop new ventilation strategies to improve indoor air quality without loss of thermal comfort and energy efficiency, as highlighted in a study by Nair et al. [
28].
A literature review showed that the main research topic is the optimization of heat demand or consumption. This aspect is often associated with the study of thermal comfort and less often with the optimization of environmental influences (most often the greenhouse effect). Only a few of the studies cited above consider the quality of indoor air, as described by the concentration of CO
2 in the rooms of buildings. The standard [
8] specifies the minimum ventilation airflow in buildings. This airflow ensures the required indoor air quality in rooms described by the CO
2 concentration. Obtaining the required values of air change rate in buildings with natural ventilation is very difficult, especially in summer and winter periods in cold and transitional climates, as it results in an increase in heating costs. Most of the buildings in Poland have already replaced old windows with new ones with better heat transfer coefficients and sealing materials. Usually, window air diffusers are not mounted. Single-family residential buildings in Poland are most often equipped with central heating systems where the heat source is gas or coal boilers and natural ventilation (without heat recovery). Therefore, in winter, residents striving to reduce heat consumption do not unseal windows, thus limiting infiltration and unconsciously exposing themselves to the side effects described above.
The aim of this article is to analyze the impact of various ventilation systems (natural and mechanical) on heating demand, thermal comfort, and CO2 concentration in a single-family house in Poland. To obtain the best solutions, the selected parameters of the considered systems have been optimized with the use of genetic algorithms. The results of this research gave an answer to the question: is it possible, in the temperate climate, to obtain an acceptable compromise between energy demand and the concentration of pollutants in buildings with simple ventilation systems without heat recovery? Furthermore, the benefits of using fans integrated with the earth-to-air heat exchangers were tested in relation to simple wall fans to maintain proper microclimate conditions inside the building.
2. Methods
The symbols and abbreviations used in the further part of the manuscript are described in the text and additionally are defined in
Appendix A.
2.1. Building
A building in the south of Poland, in the town of Skoczów, was selected for the investigation. It is a semi-detached house built in 2018. Each part is designed for a family of four. The building model (one part of the twin was taken into account in the numerical analyzes) and the ground and first floor plans are shown in
Figure 1. On the ground floor there is an: entrance 3.05 m
2, hall 3.3 m
2, bathroom 4.6 m
2, and kitchen with living room 36.4 m
2; on the first floor: hall 3.3 m
2, bathroom 6.4 m
2, master bedroom 7.6 m
2 and two children’s rooms: 10.7 m
2 and 12.1 m
2. The walls are constructed from brick and the ceiling is reinforced concrete. The walls are insulated with polystyrene and the roof is insulated with mineral wool. The heat transfer coefficients for the partitions are shown in
Figure 1.
The building had already been taken into account in previous research [
7,
29]. In these studies, the heating and cooling demand and thermal comfort were examined for different variants of building insulation and ventilation systems, as well as for different climates.
Contrary to previous research, this article details a study of:
a more detailed natural ventilation model (described below), which was used in the simulations;
the benefits of using an earth-to-air heat exchanger (earth tube) in a ventilation system were analyzed in relation to other solutions;
CO2 concentrations were taken into account as one of the parameters that describe the indoor environment in the building;
different control model were used in the ventilation system;
different optimization tools were used.
2.2. Cases under Consideration
The simulations were carried out for several cases of building ventilation:
Case 1 (basic—AW)—this is a case similar that discussed in article [
7]. The building has natural ventilation; the automatic windows consider only the thermal comfort of the residents (the CO
2 concentration is not included). For safety reasons, only a slight tilt of the window (2 cm) is allowed. Windows can be opened or closed at any time; The minimum supply of airflow is not specified. With closed windows, air flows only through leaks in the building;
Case 2 (AWCO2)—as in Case 1, but opening windows is to ensure thermal comfort, adequate indoor air quality (low level of CO2 concentration);
Case 3 (F)—rooms intended for permanent residence of people are equipped with supply fans controlled to provide thermal comfort with low heating demand;
Case 4 (FCO2)—as in Case 3, but the mechanical ventilation has to additionally reduce pollution (CO2 concentration) in the rooms;
Cases 5 and 6 (ET, ETCO2)—as in cases 3 and 4, but the ventilation airflow supplied to the rooms passes through the heat exchanger (earth tube).
The simulations were carried out with 15-min time steps for the whole year for the TMY (typical meteorological year) climate data for the closest location (Katowice) [
30]. The minimum temperature is −18.6 °C, and the maximum is 30.8 °C, with an average annual temperature of 8.0 °C.
2.3. Software and Simulation Algorithm
One of the main issues under analysis is the examination of the effectiveness of several ventilation methods to improve air quality and thermal comfort in the building’s rooms. As the building is naturally ventilated, it is necessary to consider inter-zone airflows. In thermal simulations, the EnergyPlus 9.4 program (US Department of Energy, Washington, DC, USA) [
31] was used. This program is most often used for this type of calculation. It has a built-in AFN module (Airflow Network) to calculate inter-zone airflows in the building. Unfortunately, it lacks a model for a gravity ventilation chimney. Such chimneys are in the building under consideration. In EnergyPlus (EP), they can be modeled as separate [
32] zones. However, it greatly complicates the geometry of the building. Therefore, in the article, it was decided to use the Contam program (National Institute of Standards and Technology, Gaithersburg, MD, USA) [
33] to calculate the airflows in the building. EP and Contam exchange information with each other during the simulation (co-simulation). The FMI standard (FUNCTIONAL MOCK-UP Unit) [
34] was used to link the two programs. EP is the main program and automatically runs calculations in Contam.
The combination of EP and Contam programs described above is only part of the simulation software. It also includes a tool to optimize the model and control. All programs (libraries) used in the process of building and optimizing the model are listed below.
The following were used to build the building model for EP-Contam co-simulation:
ContamW (National Institute of Standards and Technology, Gaithersburg, MD, USA)—Contam graphical interface, where a building model for Contam (.prj) was prepared, taking into account the simplified geometry of the building floors and all airflow paths;
Contam3DExporter (National Institute of Standards and Technology, Gaithersburg, MD, USA)—a tool that creates an input file for EP (.idf) from the .prj file and a packed FMU file with all the files necessary for co-simulation (EP-Contam). There are, among others, files with information about exchanged parameters (.xml, .vef), the Contam computing engine: ContamX (adapted to work with EP), and the ContamFMU.dll library manage data exchange [
33];
SketchUp Make 17.2 (Trimble, Westminster, CO, USA) [
35]—a graphical program supplemented with the Euclid [
36] overlay was used to complete and edit the geometry of the model (.idf file that was created in Contam3DExporter);
EnergyPlus 9.4—supplementing the remaining data necessary for thermal simulations (heat gains, heating system). Verification of the correct operation of the model.
The simulation tool with optimization of some model and control parameters was developed in Python 3.8.8.
The core was made up of three libraries:
EnergyPlus Python API 0.1 (US Department of Energy, Washington, DC, USA) [
37]—allows calling EP as a library from a Python script. In addition, in such a connection, it is possible to send information between these programs back and forth. Thanks to the API, it can replace the function-poor internal programming language EP (EMS) with Python scripts with virtually unlimited possibilities;
eppy 0.5.57 [
38]—is a scripting language for EnergyPlus .idf files. In the created program, it was used to edit the optimized parameters’ values in the .idf file;
pymoo 0.5.0: multi-objective optimization in Python [
39]—it is a library containing several algorithms for single—and multi-criteria optimization. The simulations used the NSGA-II algorithm, which is the most frequently used algorithm in engineering applications for multi-criteria optimization. It is based on the method of genetic algorithms.
The diagram of the information flow between the program modules is shown in
Figure 2.
The pymoo library objects controlled the entire optimization process. It defined the internal parameters of the NSGA-II algorithm (e.g., population size, number of generations, types of crossover, and mutation), as well as the type (real or integer) and range of decision variables. The rest of the calculations were carried out in parallel for each element of the population separately (the joblib library was used for the parallel calculations). Depending on the need, the decoded parameters could be sent to the .idf file (using the eppy library) or sent to your own Python script (user script). For example, in the tests, these were the constant parameters present in the controller deciding on the operation of the fans. The driver status (on-off) was calculated in the own script, incl. depending on the parameters passed.
The run of EP as a library with the loaded input file (.idf file) was performed automatically from a Python script. EP was running and exchanging data with ContamX. From EP to Contam, the following data were transferred [
40]: climate data (outdoor temperature, atmospheric pressure, wind speed and direction), temperatures in zones, and additional information, for example, the values of controllers controlling the operation of fans. In the opposite direction, the following data were sent: infiltration airflows and inter-zone airflows.
The EnergyPlus Python API (first released with EP version 9.3) enabled data exchange between EP and Python (user script). From the EP to the User script, the outdoor and zone temperatures (needed in the controller) and the values needed to calculate the objective function in the optimization process were transferred. The driver values calculated in Python were transferred from the user script to EP.
The calculated values of the objective function were assigned to the population elements and returned to the pymoo library, where the standard operations of the genetic algorithm method were performed: selection, crossing and mutation. Then, the processes described above were repeated for new elements of the population.
The end result of the optimization was the set of optimal solutions. From this set, the solution with the best parameters was selected. This stage of searching for the best solution is called: Multi-Criteria Decision Making (MCDM). Various criteria used in the MCDM can be found in the literature.
2.4. Model of the Building
2.4.1. The Thermal EnergyPlus Model
The model contained ten thermal zones. The thermal properties of the building partitions were modeled according to the real state of the building. Window 7.8 program [
41] was used to determine the detailed data that describe the optical properties of the windowpanes. The model included: heat gains from electrical equipment, occupants, and lighting (the hourly schedule was adopted). An ideal controller for the heating system was assumed. The heating set-point for all rooms, except bathrooms, was 21 °C; for bathrooms, it was 24 °C (with a night reduction to 18 °C). More detailed information on the numerical values can be found in the mentioned articles [
7,
29]. In this section, the model is similar to previous models. However, it is completely different from the airflow model described in the next section.
Figure 3 presents the first-floor model prepared in CONTAM.
2.4.2. The Ventilation CONTAM Model
The ventilation model took into account airflow through leaks in the building envelope and ventilation achieved through opening windows or supply fans. Three gravity chimneys were modeled. The airflow took place through the door openings. It was assumed that the doors to the rooms on the first floor were half-open. The airflow was calculated taking into account the variable indoor temperature calculated in the EP program.
The following airflow models were assumed [
40]:
Both programs (EP and CONTAM) can simulate the CO2 concentration in rooms. CONTAM was selected for this purpose because ventilation is also calculated in this program. The CO2 concentration in the outdoor air was assumed to be 400 ppm. The CO2 flux generated by people depends on their activity. Each of the residents generates, on average, 0.0382 dm3/s. The same occupancy schedules were independently introduced into the EP (heat gains) and CONTAM (CO2 emissions).
2.4.3. The Earth Tube EnergyPlus Model
EnergyPlus has a built-in earth tube model (earth-to-air heat exchanger). The results obtained from this model depend on several parameters [
44]. These are numerical parameters that describe the soil, which is calculated in a separate program attached to the EP, depending on the type of soil and climate. The study assumed that the soil conditions are heavy and that the damp and soil surface conditions are covered and dry. Additional parameters in the earth tube model describe the design of the exchanger. These are pipe radius, length, and depth of underground surface (these values are optimized in the study), pipe thickness and thermal conductivity (plastic pipes are assumed). Outdoor air is forced to the exchanger by the fans. The study assumes that each of the four rooms has a separate system consisting of an exchanger and a fan.
2.5. Control and Optimization
The control is to ensure the acquisition of minimum values of the objective function. In the study, these were:
- 1
F1: number of hours [h] when there is a low indoor environmental quality in the rooms. Two cases have been considered:
- A
Only thermal comfort was analyzed. Operative temperatures that do not fall into the second category of the ASHRAE standard model [
45] were assumed to be unfavorable conditions;
- B
Thermal comfort and CO
2 concentration were analyzed. Operative temperatures and CO
2 concentrations that do not fall into the second category of the ASHRAE standard model [
45] were assumed to be unfavorable conditions (a CO
2 concentration of 800 ppm above the background was assumed for all rooms).
- 2
F2: annual heating demand in kWh.
The second objective function was computed for all six cases. The 1A function for cases AW, F, and ET and function 1B for cases with CO2 extension.
Both functions are strongly dependent on the ventilation airflow. However, to ensure an optimal indoor environment, a sufficiently large ventilation airflow must be provided, and to reduce the heat demand, this airflow must be limited. These two opposing objective functions are the reason why their minima should be searched for separately, and therefore the solution is the set of the best solutions obtained in the optimization process.
The EN 16798-1 standard [
8] gives four categories of CO
2 concentration in living zones. For category II, it is 800 ppm above the outdoor concentration for living rooms. The same standard specifies the design of ventilation airflows. For the analyzed building, the minimum airflows (minFlow) in individual rooms are 58 m
3/h, 29 m
3/h and 15 m
3/h for the living room, bedroom, and children’s rooms, respectively.
Fans in cases with and without earth tubes had a similar control system, but in the first case, the supplied air was heated in the heat exchanger, and in the second, the air at the outside temperature was blown into the room. The main assumptions were:
Cases AW and AWCO2: minimum airflow equaled infiltration air. The windows were tilted if the indoor temperature was higher than the acceptable value (optimized value), and in the case of AWCO2, the window could also be tilted if the CO2 concentration exceeded the allowable value (optimized value).
Cases F and ET: when occupied, the rooms were always ventilated by means of supply fans, with at least the minimum airflow in accordance with the standard. If such an airflow was unfavorable due to the increase in energy consumption for heating and there were no residents in the building, the fans might turn off. The fan also had a second stage with a larger supply airflow, which was activated when the acceptable indoor temperature was exceeded (optimized parameter) and the supply air temperature was lower by 0.5 K than the indoor temperature.
Cases FCO2 and ETCO2: both indoor temperature and CO2 concentration in the room had an influence on the supply airflow. As the concentration of CO2 in the rooms was analyzed in each simulation time step, no minimum airflow was introduced while the people were in the rooms (the rooms had only infiltration when the fans were turned off). The supply airflow was calculated as the maximum of the three values, two of which depend on the CO2 concentration and one on the indoor temperature. All values were computed as the minFlow functions:
- (a)
if the CO2 concentration in the room was higher than the acceptable value (limitPPM—optimized value), the airflow was calculated as the product of the numerical parameter (parCO2A—optimized value) and minFlow,
- (b)
if the above condition occurred and the CO2 concentration increased (the increase in CO2 in the room within 0.5 h was greater than the acceptable value: deltaPPM—optimized value), which means that the supply airflow was too small to maintain good indoor air quality, then the supply airflow was increased and calculated from the relationship: (parCO2A + parCO2B) × minFlow; parCO2B—optimized value,
- (c)
when the acceptable value of the indoor temperature was exceeded (limitT—optimized parameter) and the supply air temperature was lower by 0.5 K than the indoor temperature, the airflow was calculated from the formula: parT × minFlow; parT—optimized value.
The method and tools used in the optimization process have been described in previous sections. It also specifies the objective functions and design variables. In this section, the parameters that have been optimized for each variant are presented. The following were optimized:
Case AW (two optimized values): temperatures at which the window is opened, separate for the ground floor and the first floor (discrete variables: 21: 0.5: 26 °C). Below this value, the window is closed. The window is opened only when the outdoor temperature is lower than the indoor temperature by 0.5 K.
Case AWCO2 (four optimized values): compared to case AW, additionally, the level of CO2 concentration at which the window is opened, separate for the ground floor and the first floor (discrete variables: 500:100:1200 ppm). The window opens if the acceptable temperature or carbon dioxide concentration value is exceeded.
Case F (six optimized values): temperatures at which the higher fan speed is switched on, separate for the ground floor and the first floor (discrete variables: 21:0.5:26 °C). The airflow value for the higher speed of the fan is calculated as the product of the optimized numerical parameter (discrete value: 1.1:0.1:2, separate for each room where the fan is installed) and the standard minimum value of the airflow (described above).
Case FCO2 (24 optimized values): parameters parT (discrete value 1.1:0.1:2), parCO2A and parCO2B (discrete value 0.1:0.1:1), separate for each fan. The allowable values of indoor temperatures (discrete values: 21:0.5:26 °C), the CO2 concentration (500:100:1000 ppm) and the increase in the CO2 concentration (50:50:400) were optimized separately for each room.
Cases EA and EACO2: as cases F and FCO2, but additionally, the parameters of the earth tube were optimized: radius of the pipe (discrete value: d ∈ {0.055, 0.08, 0.1}, pipe depth under the surface of the ground: 1:0.2:1.6 (discrete value) and different pipe length for each exchanger: 10:10:50 m. In this way, a total of 12 and 30 optimized values for EA and EACO2 were obtained, respectively.
The result of two-criteria optimization is not one solution but a set of solutions representing trade-offs between conflicting objectives. A set of solutions with the best possible compromises lies on the Pareto front. Solutions on the Pareto front cannot be improved for one objective without compromising others. Among these solutions, two were finally analyzed: the solution for which the first objective function assumed the minimum value (minF1) and the Utopia solution. This is the solution that is closest to the fictional point (Utopia point) with the minimum coordinates of both objective functions. In scientific works, it is very often selected for analysis as a compromise solution.