## 1 Introduction  
Compost bedded pack (CBP) barns represent a relatively new loose housing system for dairy cows able to improve cow comfort [1, 2]. These facilities are similar in many aspects to typical free-stall dairy barns. Both types of buildings have feed mangers, feed alleys and waterers. The main difference is that in CBP barns the area occupied by free-stalls and free-stall alleys is replaced with a bedded pack area. The bedding is generally aerated twice a day using appropriate equipment to dry the surface and incorporate manure into the pack [3].  
The CBP housing system has gained a real global interest in the last decade. However, many questions remain regarding best management practices for this system because it is relatively new. An important question is how to design the environment so that the building ensures adequate comfort while supporting the composting process. The answer may be associated with the structural design and the ventilation system used in the CBP system.  
The use of natural ventilation is widespread in livestock buildings and is generally the preferred solution in dairy barns for the indoor climate control [4]. The aim is to assure a good air quality inside the barn [5], maintaining at the same time low energy costs [6].  
CBPs must normally operate with natural ventilation, which renews the air in a closed environment with no use of mechanical elements. This can lead to energy savings, as it avoids the use of air conditioning systems and improves the air quality [7]. Although a large number of cattle are being raised in confined housing using natural ventilation systems, research for livestock buildings has been primarily conducted on mechanical ventilation [8].  
In designing a natural ventilation system for CBPs it is necessary to assess the ventilation induced by thermal buoyancy and wind forces during different seasons and under different animal housing conditions [9]. More studies on how naturally ventilated system performance affects management and environmental conditions are needed.  
Maintaining active composting in a CBP is a real challenge during the winter months. It becomes difficult to start or restart a CBP in winter with low bacterial activity as the heat losses can easily outweigh the heat generated.  
The thermal environment inside a livestock building needs tools to be characterized. Application of mathematical models and of numerical simulations based on computational fluid dynamics (CFD) is becoming more and more frequent [10; 11; 12; 13].  
Computational simulations are important for predicting natural ventilation from different types of animal structures, especially when real on-farm measurements are difficult and laborious [14; 15; 16; 17; 18]. However, the reliability of the generated information depends on if the computational simulations agree with some kind of experimental data. CFD studies also often involve significant approximation and can lead to an incomplete understanding of indoor air quality, air change rates, effectiveness and external airflow structures [19; 20].  
The purpose of this study was to develop a 3D CFD model to investigate the performance of a CBP barn structure with a natural ventilation system and its influence on the surface of the bed, faced with different wind directions and roof configurations.