Animal-based foods are essential for healthy nutrition. To ensure the production of these foods in the desired quality and quantity for human consumption, high animal productivity is essential. Therefore, to provide animal-based foods, animals should be raised in environments suitable for animal welfare, and the structural, architectural, and climatic characteristics of barns should be planned to create optimal conditions [
1]. Planning for optimal conditions should consider many factors. Chief among these are the availability of energy efficiency and thermal comfort, the challenges and opportunities of animal barn design, and pre-design simulation studies to ensure optimal conditions. Therefore, to provide a more comprehensive overview of the literature, the introduction section of the article is divided into subsections. These subsections address challenges and opportunities in animal husbandry building design, the current status and limitations of thermal simulation technologies, key issues in energy efficiency optimization, and the objectives and innovative approaches to the study. These are presented below.
1.1. Challenges and Opportunities in Livestock Building Design
In addition to population growth, the demand for animal products for nutrition has increased due to rising incomes. This has also increased animal production, and projections indicate that this increase will approximately double by 2050 [
2]. This increase in animal production has created the necessity of improving the design features of livestock buildings. As with all building types, the energy consumption of buildings designed to house animals must be reduced, and their overall performance must be increased. However, because animal production involves various biological and physiological balances, livestock buildings must be designed with efficiency and animal welfare in mind. This makes the design of livestock buildings more challenging. Furthermore, livestock buildings must be designed specifically to fit the regional landscape [
3].
As in all building types, throughout human history, the choice of material for livestock structures has been determined by their abundance, workability, and availability. Accordingly, livestock structures have been designed using materials such as stone, wood, adobe, and clay brick. Over time, solutions have been developed that take into account animal welfare in the designs. Especially in the mid-20th century, animal production began to be carried out in enclosed structures specifically designed for animals [
4]. The diversified livestock designs have gained a different dimension with the discovery of materials developed in the construction field, such as iron, steel, and concrete. Furthermore, the developing material technology in the construction sector has been tried to be adapted according to the changing and different parameters of livestock structures. Conditions such as productivity and welfare for livestock have made the design and material selection of livestock structures more difficult and necessary to evaluate in detail [
5].
In response to the risks posed by global warming, efforts to reduce energy consumption have accelerated along with increased efficiency in the construction sector. Concepts such as sustainable buildings and green buildings, created through innovative design practices and the selection of appropriate materials, have come to the forefront [
6]. This is even more crucial in livestock buildings, where efficiency, welfare, and sustainability must be ensured. Optimal designs for livestock buildings not only ensure sustainable structures but also reduce energy consumption, potentially preventing a factor that could negatively impact global warming. Therefore, technology, innovative design approaches, and the selection of appropriate materials for these designs should be considered as a whole in the design of livestock buildings [
7,
8].
Livestock buildings are among the primary elements that contribute to local development in terms of rural landscape and environmental sustainability, in addition to food production. Because they involve biological processes, along with efficiency and welfare for animal production, the design of livestock buildings has distinct technical characteristics from other building types. The fact that these designs directly impact the rural landscape necessitates ensuring optimal conditions in the design of these structures [
9]. This, coupled with the need for food production, increases the importance that should be given to livestock buildings. This increased importance has increased interest in livestock buildings, which has presented a positive opportunity for them. As a result of comprehensive studies conducted during the design phase of livestock buildings, policies for the development and improvement of rural areas have been developed. Thus, regional development can be achieved alongside animal production [
10].
Bringing healthy, high-reproductive animals to the farm to improve the quality and quantity of livestock products, developing an appropriate ration program, and feeding them properly are not sufficient for sustainable animal production. Improving environmental conditions and structural elements is crucial for animal production. Structural, social, and climatic factors within livestock building conditions play a significant role in animal behavior. Deficiencies in structural elements contribute to adverse environmental conditions in livestock buildings. These structural elements include windows, floors, roofs, walls, and bedding. Insufficient window space can lead to ventilation and lighting problems, which can lead to lung diseases in animals. The structural elements used in the architectural planning and design of livestock buildings indirectly affect animal productivity and behavior. From a cost perspective, the design and construction costs of livestock buildings account for 55% of the fixed investment costs [
11].
1.2. Current Status and Limitations of Thermal Environment Simulation Technologies
From an animal production perspective, structural, social, and climatic factors play a significant role in animal behavior within livestock buildings. Deficiencies in structural elements within barns lead to adverse environmental conditions. Thermal comfort is the primary impact of these adverse conditions on animals. Numerous studies on livestock buildings indicate that inadequate thermal comfort within barns negatively impacts animal production efficiency. Numerous variables within the barn, such as air quality, natural or artificial ventilation systems, and roof and window positions, are important. In this context, maintaining thermal conditions depends on many factors, the most important of which is the proper planning of building elements. Ensuring thermal comfort also helps control energy consumption [
12].
Thermal comfort must be ensured in all buildings, including livestock buildings. Therefore, thermal environment simulation studies are conducted to ensure optimal conditions during the design phase of buildings. Programs such as DesignBuilder, DOE-2, eQuest, Ecotect, Energy-10, EnergyPlus, Green Building Studio, HEED, and IESVE have been developed for building simulations and are being used successfully to simulate the thermal environment in buildings [
13].
An examination of the programs used in thermal environment simulations reveals that most of them consist of a simulation engine and a graphical user interface (GUI) connected to this engine. The engines in simulation programs are necessarily developed in computer languages such as FORTRAN, C, and C++. GUIs, which can quickly perform input and output operations, facilitate the preparation of parameters and outputs generated in simulations, ensuring proper operation. In most programs used in thermal environment simulations, the GUIs and the simulation engines are designed separately [
14].
Programs such as Ecotect, Radiance, DAYSIM, and EnergyPlus can systematically simulate thermal environments using multiple engines. Thermal conditions are determined in the simulations using data such as sun, daylight, and airflow. These programs also import data using IFC or gbXML via the engine unit and GUIs. These operations are performed using Design Builder and Hevacomp, GUIs developed for EnergyPlus. However, many simulation programs create thermal simulations using advanced IFC and gbXML schemes, but manual simulation checks and modifications are required to determine the optimum conditions for buildings. Limitations of these models include the time-consuming nature of simulation models, the possibility of error, and the need for manual control [
15].
1.3. Basic Issues in Energy Efficiency Optimization
Optimization processes in building design are defined as all procedures designed to ensure a building design achieves optimal energy efficiency. Energy efficiency optimization requires preparation. This preparation is followed by optimization processes and, finally, the final stages of optimization. These processes include creating a model for energy efficiency optimization, defining functions for the objectives, and transferring simulations to the software along with independent variable parameters. Following these processes, the phase begins, which involves identifying any existing errors along with the target function and optimization timeframe. The final stage involves interpreting the results [
16].
Energy efficiency optimization can be defined to include a single objective. However, if necessary, a function can be created to encompass two or three objectives. Optimizations defined for energy efficiency are designed to reduce annual energy consumption in buildings. However, efficiency performance must be taken into account in the various optimizations created for the algorithms [
17].
Along with defining the targets for energy efficiency optimization, independent variable parameters in buildings must also be established. In this context, building design should determine the properties of building materials such as glazing type, window area, and natural and mechanical ventilation in terms of shape [
17]. At this point, building shape, in particular, can be evaluated differently in terms of energy efficiency optimization. A general determination can be made for other building materials besides building shape. The most frequently considered variables in terms of building materials and design parameters in energy efficiency optimization are known as glazing type, amount of natural and mechanical ventilation, window-to-wall ratio, and wall material [
18].
Studies on energy efficiency optimization in buildings with the aim of reducing negative environmental impacts and energy consumption are rapidly increasing globally [
19]. This is even more important for livestock buildings. Reducing energy consumption in livestock buildings, along with environmental impact studies, is essential for sustainable animal production [
20]. In addition to reducing energy consumption, it is also possible to increase thermal comfort with optimum architectural design [
21]. Many studies on livestock buildings have concluded that many variables, such as natural or artificial ventilation facilities and roof and window positions, are important for energy efficiency. In this context, ensuring energy efficiency in livestock buildings depends on many factors, the most important of which is the correct planning of structural elements. It will be possible to obtain optimum design parameters through correct energy efficiency optimization studies in livestock buildings [
22].
1.4. Objectives and Innovative Method of the Study
Air temperature and relative humidity are among the most important physical factors affecting the highest possible productivity in livestock buildings. Dairy cattle, in particular, can tolerate biologically ideal environmental conditions to a certain extent and minimize adverse effects. Therefore, dairy cattle are defined as warm-blooded (homothermic) animals. While individual cattle vary in this regard, breed, type, and productivity factors are the determining factors [
23]. The resulting temperature increase allows dairy cattle to eliminate 15% of their internal body heat directly through respiration. Furthermore, when the ambient temperature in livestock buildings exceeds 25 °C, feed consumption begins to decline, and when it exceeds 30 °C, a significant decrease in feed consumption is observed. At 40 °C and above, feed consumption ceases completely. One of the most important reasons for the decrease in feed consumption under high temperatures is that the high respiration rate in animals prevents feed consumption [
24].
Heat stress directly affects dairy farming productivity, but it also alters the chemical structure of the milk produced. At low temperatures, the fat content in milk decreases, while at high temperatures, the fat content is higher. Furthermore, high ambient temperature and relative humidity also affect reproduction in dairy cattle [
25]. Hormonal activity changes, and the severity of estrus behaviors decreases, or estrus disappears altogether. Furthermore, embryonic mortality and fertility declines occur. This demonstrates that if heat stress is not eliminated in livestock facilities, not only will animal welfare and productivity decline, but the sustainable maintenance of livestock production will be impossible [
26].
In livestock buildings, ensuring that energy savings are combined with thermal comfort is of paramount importance. Proper adjustment of livestock barn design parameters positively impacts animal health and productivity. Generally, the building environment can be improved through many design parameters, such as ventilation and construction materials [
27]. Geothermal, passive, aerothermal, and biogas solutions are used to reduce fossil fuel consumption in livestock barns [
28]. Building (barn) energy simulation (BES) experiments are conducted to determine the effectiveness of these solutions or new barn design parameters and their potential use in barns. The created BES models reveal the building’s climatic environmental conditions and energy performance with specific input and output parameters [
29,
30]. The creation of BES models, especially in animal barns, has gained importance for animal welfare and productivity. It is envisaged that the increasing BES studies in livestock building research in recent years will form the basis of energy performance certification programs in the future [
31].
BES models can play a significant role in assessing many different impacts on livestock buildings, such as climatic environmental conditions, energy consumption, and thermal discomfort duration. While livestock buildings share some characteristics with buildings occupied by people, they require different expertise in certain areas. For example, the need for higher ventilation rates, different airflow rates, and differences in cooling and heating systems are all points that should be considered in the simulation models to be developed. Furthermore, using BES models and housing parameters during the design and management stages of livestock buildings positively impacts energy efficiency [
32].
Numerous studies have modeled BES to provide thermal comfort conditions and energy consumption in livestock buildings. Some of these studies simulated periods of thermal stress in animals, while others simulated energy consumption by considering ventilation and various design parameters. This innovative approach examines all aspects of thermal stress, energy consumption, and optimal design parameters and develops a prediction based on indoor thermal comfort temperature. Furthermore, this innovative approach resulted in the creation of a heat balance model according to the ASHRAE Standard to adapt the barn heat balance to Energy Plus.
A review of the studies reveals that Cooper et al. [
33] and Liberati and Zappavigna [
34] created a general energy simulation model for animal barns with mechanical or natural ventilation systems. In another study, Shin et al. [
35] developed a simulation to calibrate the electrical energy consumption of ventilation fans in animal barns. Similarly, Kwak et al. [
36], Jackson et al. [
37], Axaopoulos et al. [
38], and Wang and Xue [
39] developed simulation models for energy consumption in animal barns. However, when the BES models in animal barns are examined in terms of thermal stress, it is seen that simulation models have been developed for the climatic conditions inside the barn and for some design parameters. Among these studies, Mikovits et al. [
40] developed a simulation to determine the thermal stress in pig barns. In a similar study, Schauberger et al. [
41] created a simulation to reveal the thermal stress inside the barn. In a different study evaluating the design parameters, Gonçalves et al. [
42] developed a simulation model to reveal potential heat stress by considering different roof tile types. In other studies, simulations were developed by Shin et al. [
43], according to climatic environmental conditions, and by Lambert et al. [
44], according to humidity values.
In this study, a novel barn energy simulation (BES) was developed to estimate the effects of structural elements in dairy barns on the energy consumed by the barn’s structural elements and the thermal comfort of the animals inside the barn. The simulation is a novel virtual simulation of a dairy barn based on a computer-based mathematical model created according to the basic energy balance equations commonly used in buildings [
45]. In addition, a barn simulation was created using simulation tools such as DesignBuilder, EnergyPlus, and TRNSYS, which provide numerical data evaluation across different data sets and are widely used in many thermal analysis studies in buildings and animal barns [
35,
43,
46].
This study examined the most important design parameters required to estimate thermal comfort and energy consumption for animals in dairy barns. The identified parameters were exterior wall construction, roof construction, glazing type, natural and mechanical ventilation ratio, window-to-wall ratio, window area cooling setpoint temperature, heating setpoint temperature, and infiltration rate. The effects of these parameters on thermal comfort and energy consumption were investigated using BES tools. Design parameters were statistically evaluated for thermal comfort and energy consumption using Pearson correlation. In this context, the study estimated the most important design parameters that can reduce energy consumption and increase thermal comfort in dairy barns. A review of simulation studies on animal barns revealed that models are generally developed from the perspective of thermal stress or energy consumption. These models, by simulating various design parameters, only addressed specific issues, such as the relationship between total energy consumption and periods of thermal stress. This study, unlike existing research, considered thermal stress and total energy consumption together and created new simulations considering all barn design parameters. Furthermore, the optimum indoor thermal comfort temperature for the barn was estimated. In this context, a more comprehensive study was conducted for animal barns. Simulated values were also validated against barn values. The study aimed to control total energy consumption by reducing thermal stress levels for animals. To this end, a new approach was developed to estimate the optimum values for various barn design parameters. In this context, the research will contribute to the use of optimal design parameters during the project design phase, increase thermal comfort, positively impact animal welfare and productivity in dairy farming, and reduce energy consumption.