3D CFD Analysis of Natural Ventilation in Reduced Scale Model of Compost Bedded Pack Barn for Dairy Cows

Compost bedded pack (CBP) barns have been receiving increased attention as an alternative housing system for dairy cattle. To create a satisfactory environment within CBP barns that promotes a good composting process, an adequate air movement and minimal temperature fluctuations throughout the building are required. Therefore, a study based on compost barn structure model employing techniques of dimensional analysis for naturally ventilated buildings was developed. Three-dimensional computational fluid dynamic (CFD) simulations of compost barns with different ridge designs and wind direction, along with the visual demonstration of the impact on airflow through structure were performed. The results showed that the barn ventilation CFD model and simulations were in good agreement with the experimental measurements, predicting the airflow through the CBP barns structure for alternative roof ridge types adequately. The results also indicate that the best roof configuration in the winter was the open ridge with chimney for a west to east wind direction.


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 This wind tunnel had a test section of 2.40 m × 1.20 m and situated at 3.60 m from the upwind edge of the window.
Smoke was used to visualize the airflow behavior (laminar or turbulent) throughout the test section. Photographs and videos as the primary method of data recording were used. Airflow patterns were visualized using a fog machine (power 1190 W, Rosco ® , model 1700, Round Rock, TX, USA) with vaporized glycerin as the smoke source. The smoke tracer was introduced from the generator with a funnel on the end of a duct and allowed to entrain smoke with the air using the negative pressure of the wind tunnel.

Scale model-Selection of variables
The purpose of this scale model study was to evaluate natural ventilation characteristics (wind direction) and alternative ridge designs. The baseline for the scale model was a CBP barn located in Kentucky.
The airflow rate, air patterns and system performance under natural ventilation are affected by fluid properties including viscous forces, inertia forces and buoyancy forces. These properties were represented by Reynolds and by building geometry factors. Assuming that the same phenomenon governs performance in the scale model, key variables affecting ventilation characteristics were compiled (Table 1) and reduced to basic dimensions of length (L), mass (M), temperature (θ) and time (T). Variables selections were determined based on four major assumptions: incompressible flow, negligible generation of gases and moisture from the building environment and significant internal heat generation from the compost pack. Gravitational acceleration m s −2 g L T −2 5 Coefficient of heat transfer kg s −3 K −1 h c M T −3 θ −1 6 Heat kg m 2 s −2 Q M L 2 T −2 7 Wind velocity m s −1 v w L T −1 8 Temperature of air K T a θ 9 Density of air kg m −3 ρ M L −3 10 Specific heat of air m 2 s −2 K −1 c p L 2 T −2 θ −1 11 Heat transfer coefficient kg Dynamic viscosity of air kg m −1 s −1 µ M L −1 T −1 13 Thermal conductivity of air kg m s −3 K −1 k M L T −3 θ −1 14 Coef. of thermal expansion According to the Buckingham π theorem, a group of ten (14 variables minus 4 dimensions) independent π-terms was available. The relationships among π-terms for fluid flow and heat transfer are expressed in Table 2. Table 2. List of π-terms.
The tests were performed with the airflow in the scale model geometrically and dynamically similar to a full-scale CBP barn. To ensure the similarity of the characteristics of the airflow in the scale model and real scale CBP barn, the flow regime, expressed by the Reynolds number, must be equal in both cases: [Re] Model = [Re] Full . Therefore: where, Re is the Reynolds number (dimensionless), L is the characteristic length describing the geometry of the flow field (m), ρ is the specific mass of the air (kg m −3 ), v is the velocity of the air (m s −1 ) and µ is the viscosity of the air (N m −2 s −1 ).

Scale Model Procedure
All dimensions of the CBP barn were proportionally reduced for the design and construction of the scale model prototype, with the exception of the roof thickness. Reducing the thickness of the roof would result in a deformation in the shape of the roof and would affect the speed and behavior of the airflow. Thus, a scale model was constructed in accordance with the design conditions. It had a geometric length scale of 16 for testing. Two aluminum plates were used as the roof cover ( Figure 1). Five different ridge vents ( Figure 2) were constructed according to the primary types of barn ridge found in the CBPs study in Kentucky [1] and four wind directions (north, south, east and west) were investigated to represent field conditions. Term nº π-term Term nº π-term The tests were performed with the airflow in the scale model geometrically and dynamically similar to a full-scale CBP barn. To ensure the similarity of the characteristics of the airflow in the scale model and real scale CBP barn, the flow regime, expressed by the Reynolds number, must be equal in both cases: Therefore: where, Re is the Reynolds number (dimensionless), L is the characteristic length describing the geometry of the flow field (m), ρ is the specific mass of the air (kg m −3 ), v is the velocity of the air (m s −1 ) and μ is the viscosity of the air (N m −2 s −1 ).

Scale Model Procedure
All dimensions of the CBP barn were proportionally reduced for the design and construction of the scale model prototype, with the exception of the roof thickness. Reducing the thickness of the roof would result in a deformation in the shape of the roof and would affect the speed and behavior of the airflow. Thus, a scale model was constructed in accordance with the design conditions. It had a geometric length scale of 16 for testing. Two aluminum plates were used as the roof cover ( Figure 1). Five different ridge vents ( Figure 2) were constructed according to the primary types of barn ridge found in the CBPs study in Kentucky [1] and four wind directions (north, south, east and west) were investigated to represent field conditions.  Eighteen incandescent lights of 40 W each were installed as electrical heaters under the perforated plate to simulate the sensible heat of microbial activity in the compost bedding. Power flux was controlled by dimmer varying the intensity of the lights. An insulated box was built below and around the sides of the opening to promote heat transfer only through the perforated plate Eighteen incandescent lights of 40 W each were installed as electrical heaters under the perforated plate to simulate the sensible heat of microbial activity in the compost bedding. Power flux was controlled by dimmer varying the intensity of the lights. An insulated box was built below and around the sides of the opening to promote heat transfer only through the perforated plate ( Figure 3). The compost area was cover with aluminum sheet and 2.5 kg of sawdust was spread out over the surface. Eighteen incandescent lights of 40 W each were installed as electrical heaters under the perforated plate to simulate the sensible heat of microbial activity in the compost bedding. Power flux was controlled by dimmer varying the intensity of the lights. An insulated box was built below and around the sides of the opening to promote heat transfer only through the perforated plate ( Figure 3). The compost area was cover with aluminum sheet and 2.5 kg of sawdust was spread out over the surface.

Measurement and Instrumentation
Airspeed and air temperature were measured using two hot-wire anemometers (accuracy of ± 0.01 m s -1 ; Testo ® , model 425, Sparta, NJ, USA). One sensor was placed at the beginning of the working section at 1.0 m height above the floor of the wind tunnel and another sensor was placed inside the scale model using a non-uniform measured grid ( Figure 4). The locations of the measurement positions used in the experimental analysis are illustrated in Figure 4B. The hot-wire anemometer inside the building was mounted on a frame, which allowed the anemometer to be manually moved to each measurement position once measurements at each location were complete. The values measured were replicated three times. The sampling period was fixed at 10 min per collection point and the sampling rate was 3.0 s. The experiments were carried out with two reference airspeeds: 0.1 m s -1 (low wind speed) and 1.0 m s −1 (high wind speed).

Measurement and Instrumentation
Airspeed and air temperature were measured using two hot-wire anemometers (accuracy of ±0.01 m s −1 ; Testo ® , model 425, Sparta, NJ, USA). One sensor was placed at the beginning of the working section at 1.0 m height above the floor of the wind tunnel and another sensor was placed inside the scale model using a non-uniform measured grid ( Figure 4). The locations of the measurement positions used in the experimental analysis are illustrated in Figure 4B. The hot-wire anemometer inside the building was mounted on a frame, which allowed the anemometer to be manually moved to each measurement position once measurements at each location were complete. The values measured were replicated three times. The sampling period was fixed at 10 min per collection point and the sampling rate was 3.0 s. The experiments were carried out with two reference airspeeds: 0.1 m s −1 (low wind speed) and 1.0 m s −1 (high wind speed).

CFD Representation of the Scale Model Geometry
3D Rhinoceros ® design of the experimental scale model was developed and imported into the CFD package. The dimensions of the computational model were: 1.35 m in length, 1.20 m in width and 0.27 m in eave height. In this study, five different ridge vents were built as shown in Figure 1. The modifications in ridge vents were adjusted in simulations for determining the influence of different types of the ridge design on the ventilation performance. The measured values obtained experimentally for an open scale model of CBP barn and subjected to natural ventilation were used to assign the boundary conditions of the CFD model ( Figure 5 and Table 3).

CFD Representation of the Scale Model Geometry
3D Rhinoceros ® design of the experimental scale model was developed and imported into the CFD package. The dimensions of the computational model were: 1.35 m in length, 1.20 m in width and 0.27 m in eave height. In this study, five different ridge vents were built as shown in Figure 1. The modifications in ridge vents were adjusted in simulations for determining the influence of different types of the ridge design on the ventilation performance. The measured values obtained experimentally for an open scale model of CBP barn and subjected to natural ventilation were used to assign the boundary conditions of the CFD model ( Figure 5 and Table 3).

Computational Modeling
The mesh quality is very important to get accurate data and computational convergence. Thus, due to the geometric complexity of the scale model of CBP barn, it was opted to utilize the ANSYS ICEM CFD ® software for construction of a tetrahedral computational mesh, which allows for obtaining results with fewer errors [22]. Several meshes with different levels of refinement were evaluated to adopt one that provides a balance between computational time and accuracy.
Airflow rates are associated with turbulent flows and combined with heat transfer rates, generating a complex system of coupled equations difficult to resolve. Therefore, the CFD technique was utilized to solve the average Navier-Stokes and energy equations, determining velocity, temperature and pressure by the finite volume technique. The general model for non-isothermal fluid flow is described by equation of mass, continuity, energy and species transport, simplified as follows [23].
where, ρ is the specific mass (kg m −3 ); t is the time (s); U is the velocity field; p is the pressure (N m −2 ); µ τ is the dynamic viscosity of the fluid (kg m −1 s −1 ); T is the temperature (K); C p is the specific heat and D is he diffusion coefficient (m 2 s −1 ). The Reynolds tensor was modeled using standard k−ε model, which evaluates turbulent viscosity (µ τ ) from the ratio between turbulent kinetic energy (k) and dissipation of the turbulent kinetic energy (ε). The ANSYS CFX ® software was used to simulate the propose model. It belongs to the Federal University of Viçosa (Viçosa, Minas Gerais, Brazil). The following considerations were assumed: (a) steady state, (b) incompressible flow, (c) turbulent flow and (d) residue level of 10 −4 was adopted as a convergence criterion.

Compost Dairy Barn Tests
Air velocity and wind direction were measured inside and outside of five CBP barn different types of ridge vents. The cattle dairy buildings were in USA, in the state of Kentucky with similar constructive characteristics. During the study, the mechanical ventilation system of the CBP barns was turned off. Measurements of airflow velocity were taken at 0.05 and 1.2 m above the compost surface in nine locations within each CBP barns in the compost pack area ( Figure 6, points A1 to A9), at three points on feed alley (points A10 to A12) and eighteen outside points (P out 1 to P out 18 ), five times throughout the day. Air velocity was measured using a hot wire anemometer (accuracy of ±0.01 m s −1 ; Testo ® , model 425, Sparta, NJ, USA). The air direction was measurement with a weather vane. Sampling points (A1 to A9) represent the approximate center of nine grid spaces within the manure pack. The total grid (5 × 6) was established based on post spacing along the pack and generally along the center of the pack ( Figure 6).

Statistical Analysis Methods
Both linear regression and the Student's t-test were used to evaluate and compare measured (real CBP barn) versus simulated (CFD model) air velocity. The R 2 values of the linear regression indicated how consistent the measured versus predicted values follow a best-fit line, ranging from 0 (no correlation) to 1.0 (perfect correlation). The data were evaluated in the computer software SigmaPlot ® , version 11.0, (Systat Software Inc., San Jose, CA, USA) for statistical analysis and data representation. The significance level was fixed at 5% (α = 0.05). Differences between ridge openings were tested by Tukey's test.

Statistical Analysis Methods
Both linear regression and the Student's t-test were used to evaluate and compare measured (real CBP barn) versus simulated (CFD model) air velocity. The R 2 values of the linear regression indicated how consistent the measured versus predicted values follow a best-fit line, ranging from 0 (no correlation) to 1.0 (perfect correlation). The data were evaluated in the computer software SigmaPlot ® , version 11.0, (Systat Software Inc., San Jose, CA, USA) for statistical analysis and data representation. The significance level was fixed at 5% (α = 0.05). Differences between ridge openings were tested by Tukey's test.

Mesh Details
Dairy cows are mainly housed in naturally ventilated dairy barns with large openings, connected directly to the ambient, turbulent weather conditions. This makes the measurements of volume flow rate from these buildings challenging. Hence, a substantial amount of time was spent in the design of representative meshes to increase the accuracy of CFD results. If an optimum distance between the dairy barn and the boundary of the control volume is not sufficiently secured, faster airflow streams could be compared with the natural airflow resulting in unreal airflow around the leeward vent opening [22]. Thus, the size of the CFD domain used during the simulations was chosen in order to ensure that the position of the outer boundaries did not compromise the CFD solution.
A tetrahedral mesh was built in commercial ANSYS ICEM CFD ® and tests of different meshes were carried out using this software. Various sizes of tetrahedral meshes were used, and after several levels of previously evaluated refinement, no significant differences (p-value < 0.05) in the air velocity and temperature were encountered. Thus, the selected mesh was composed of 162,191 nodes and 683,222 elements (Figure 7). Such a meshing system was found to conform easily to the exact boundary of the scale model. The convergence of the solution was carefully verified by monitoring the transport equation residuals throughout the simulation. Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 17 In the present study, the authors decided to use the standard k-ε model to model the natural ventilation in the CBP. Previous studies [24] have shown that the standard k-ε model predicts reasonably well the airflow patterns in an experimental naturally ventilated livestock building.

Validation of the Measured and Simulated Values
The values of air velocity, using five ridge openings and air speed of 0.1 and 1.0 m s −1 , gave a fair correlation of measured versus simulated values. Values of R 2 and the regression equation are shown in Table 4. Good correlations were observed between measured and simulated values of air temperature, using five ridges opening and air speed of 0.1 and 1.0 m s −1 . In both conditions, for the linear and angular coefficients significant differences were detected (t test, p-value > 0.05). Table 4. Adjusted equations between the values of air velocity measured (Vmes) and simulated (Vsim), In the present study, the authors decided to use the standard k-ε model to model the natural ventilation in the CBP. Previous studies [24] have shown that the standard k-ε model predicts reasonably well the airflow patterns in an experimental naturally ventilated livestock building.

Validation of the Measured and Simulated Values
The values of air velocity, using five ridge openings and air speed of 0.1 and 1.0 m s −1 , gave a fair correlation of measured versus simulated values. Values of R 2 and the regression equation are shown in Table 4. Good correlations were observed between measured and simulated values of air temperature, using five ridges opening and air speed of 0.1 and 1.0 m s −1 . In both conditions, for the linear and angular coefficients significant differences were detected (t test, p-value > 0.05). Table 4. Adjusted equations between the values of air velocity measured (V mes ) and simulated (V sim ), and air temperature measured (T mes ) and simulated (T sim ) using air speed of 0.1 m s −1 and 1.0 m s −1 , and five ridge vents. A good relationship was observed between measured and simulated values using air speed of 0.1 m s −1 and four wind directions tested. The adjusted equations of air velocity and temperature had the lowest R 2 of 0.559 and 0.627, respectively (Table 4). Overall, the wind directions performed similarly with the exception of East to West, which produced the largest values of air velocity and temperature measured. In this treatment, there was a positive and linear relationship between the average of measured and simulated air velocity (slope = 0.8239, R 2 = 0.559) and temperature (slope = 0.4663, R 2 = 0.627). The results show a good correlation between measured and simulated air velocity at four wind directions tested (Table 4). These were demonstrated by the correlation coefficients (R 2 ). In both conditions, these equations showed the linear and angular coefficients significant (t test, p-value > 0.05).

Ridge
Given that the absolute average errors calculated between air velocities and temperature measurements and simulated values were very close to or less than 0.21 m s −1 and 1.53 • C, respectively, the accuracy values of the anemometer (±0.01 m s −1 ) and thermometer (±1.0 • C) at that magnitude of these errors would have little influence on the final result for the calculation of the variables studied. Thus, the computer models can be considered suitable for the proposed use. The air velocity distribution in a vertical plan situated in the center of the barn allows us to determine the inside air speed more precisely. Figure 8 shows the simulated air velocity vectors vertically inside and around of CBP barns equipped with closed ridge (CLR) using a different wind direction. Visually, the simulation results for east to west wind direction were very similar to west to east wind direction, thus, only the east to west wind direction is shown. Figure 8A shows the air entering the CBP barn through the ridge opening at one side, and then coming out through the sidewall opening located at the other side. So, the airflow velocity was reduced due to the presence of the wall and fences on both sides of the barn. It resulted in an internal vortex at the center of the feed alley and compost area. Figure 8B shows the effect of airflow the compost surface area near the alleyway. In Figure 8C, it can be seen a considerable variation in the direction of the air velocity vectors. Inside of the trusses structure, it can be seen that the main flow tends to turn opposite to the main wind direction. As result, the vortex of the airflow promoted the worst conditions of air circulation. A strong vortex is developed at the top of the ridge structure when the wind direction occurred along the length of the CBP. The vortex occupies almost the whole cavity in the ridge structure due to the inversed flow created through the central surface bedding area. The building geometry is a crucial aspect to achieve efficient natural ventilation and indoor thermal comfort in a CBP environment.

Computational Simulation
vertically inside and around of CBP barns equipped with closed ridge (CLR) using a different wind direction. Visually, the simulation results for east to west wind direction were very similar to west to east wind direction, thus, only the east to west wind direction is shown. Figure 8A shows the air entering the CBP barn through the ridge opening at one side, and then coming out through the sidewall opening located at the other side. So, the airflow velocity was reduced due to the presence of the wall and fences on both sides of the barn. It resulted in an internal vortex at the center of the feed alley and compost area. Figure 8B shows the effect of airflow the compost surface area near the alleyway. In Figure 8C, it can be seen a considerable variation in the direction of the air velocity vectors. Inside of the trusses structure, it can be seen that the main flow tends to turn opposite to the main wind direction. As result, the vortex of the airflow promoted the worst conditions of air circulation. A strong vortex is developed at the top of the ridge structure when the wind direction occurred along the length of the CBP. The vortex occupies almost the whole cavity in the ridge structure due to the inversed flow created through the central surface bedding area. The building geometry is a crucial aspect to achieve efficient natural ventilation and indoor thermal comfort in a CBP environment. Vortex paths are important, especially in the surface of compost bedding where turbulent fluctuations dominate over the mean flow [25]. Measurements in a full-scale set-up of this kind are challenging, not the least due to the variation of wind direction during averaging periods. Vortex paths are important, especially in the surface of compost bedding where turbulent fluctuations dominate over the mean flow [25]. Measurements in a full-scale set-up of this kind are challenging, not the least due to the variation of wind direction during averaging periods. Figure 9 shows the simulated air velocity vectors vertically inside and around of CBP barns equipped with open ridge (OPR) using different wind directions. According to Figure 9A,B, these barns produced higher ridge vent flows for the south to north and north to south wind directions at wind velocities above 0.07 m s −1 . Wind direction comparisons indicated that south winds consistently produced the highest ridge vents flows ( Figure 8A), while the east and west winds generated the lowest ridge vent flows ( Figure 9C). It can be seen that the main flow tended to turn opposite the main wind direction. In all cases, the roof presents a complicated area to model due to turbulent shear layers and ridge vent openings zones. However, this is likely to be the least important face for ventilation calculation in most animal facilities. A similar effect was observed by other researchers [23].
Appl. Sci. 2020, 10, x FOR PEER REVIEW 11 of 17 Figure 9 shows the simulated air velocity vectors vertically inside and around of CBP barns equipped with open ridge (OPR) using different wind directions. According to Figure 9A,B, these barns produced higher ridge vent flows for the south to north and north to south wind directions at wind velocities above 0.07 m s −1 . Wind direction comparisons indicated that south winds consistently produced the highest ridge vents flows ( Figure 8A), while the east and west winds generated the lowest ridge vent flows ( Figure 9C). It can be seen that the main flow tended to turn opposite the main wind direction. In all cases, the roof presents a complicated area to model due to turbulent shear layers and ridge vent openings zones. However, this is likely to be the least important face for ventilation calculation in most animal facilities. A similar effect was observed by other researchers [23].   Figure 10A,B shows considerable variation in the direction of the air velocity vectors, and consequently the flow is far from being two-dimensional. Near the ridge opening, it can be seen that vortex was located above the roof in the right ( Figure 10A) and left ( Figure  10B) side. From the Figure 10B, the north wind direction, which produced the highest ridge vent flows, also generated high air velocities inside the structure. The contour plot of wind speed revealed periodic air recirculation zone above the building due to the flow redirection caused by the chimney. Due to a portion of the high-speed, incoming airflow becomes incorporated in the indoor flow   Figure 10A,B shows considerable variation in the direction of the air velocity vectors, and consequently the flow is far from being two-dimensional. Near the ridge opening, it can be seen that vortex was located above the roof in the right ( Figure 10A) and left ( Figure 10B) side. From the Figure 10B, the north wind direction, which produced the highest ridge vent flows, also generated high air velocities inside the structure. The contour plot of wind speed revealed periodic air recirculation zone above the building due to the flow redirection caused by the chimney. Due to a portion of the high-speed, incoming airflow becomes incorporated in the indoor flow regime. This airflow recirculation was highly influenced by the velocity of the short-circuiting flow beneath the roof.   Figure 10A,B shows considerable variation in the direction of the air velocity vectors, and consequently the flow is far from being two-dimensional. Near the ridge opening, it can be seen that vortex was located above the roof in the right ( Figure 10A) and left ( Figure  10B) side. From the Figure 10B, the north wind direction, which produced the highest ridge vent flows, also generated high air velocities inside the structure. The contour plot of wind speed revealed periodic air recirculation zone above the building due to the flow redirection caused by the chimney. Due to a portion of the high-speed, incoming airflow becomes incorporated in the indoor flow regime. This airflow recirculation was highly influenced by the velocity of the short-circuiting flow beneath the roof. Distribution of air velocity on the compost area in winds direction east to west ( Figure 10C) was more uniform than the other directions tested. In this case, the air movement tended to stabilize, generating lower air velocity above the compost area. The amount of obstruction of the building is known to have an impact on the flow that crosses the structure, whereby potentially affecting air Distribution of air velocity on the compost area in winds direction east to west ( Figure 10C) was more uniform than the other directions tested. In this case, the air movement tended to stabilize, generating lower air velocity above the compost area. The amount of obstruction of the building is known to have an impact on the flow that crosses the structure, whereby potentially affecting air velocity values [15]. Due to the size of the heat source and the geometric of the building, the flow was forced over the ridge vent.
The flow near the floor was decelerated due to the stagnation point at the fence and wall that directed the airflow to the top of the building. Figure 11 shows the simulated results of CBP barn equipped with elevated ridge (ELR) in different wind directions. The east and west wind directions present the higher ridge vent outlet flow ( Figure 11C). The wind flows up the windward wall surface and above the roof of the barns with east and west winds ( Figure 11C) but hits the roof inside the barn with south and north winds ( Figure 11A,B). In addition, a lower pressure area was created above the roof in the east and west winds than in the south and north winds, thereby generating higher ridge opening flows.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 12 of 17 velocity values [15]. Due to the size of the heat source and the geometric of the building, the flow was forced over the ridge vent. The flow near the floor was decelerated due to the stagnation point at the fence and wall that directed the airflow to the top of the building. Figure 11 shows the simulated results of CBP barn equipped with elevated ridge (ELR) in different wind directions. The east and west wind directions present the higher ridge vent outlet flow ( Figure 11C). The wind flows up the windward wall surface and above the roof of the barns with east and west winds (Figures 11C) but hits the roof inside the barn with south and north winds ( Figure  11A,B). In addition, a lower pressure area was created above the roof in the east and west winds than in the south and north winds, thereby generating higher ridge opening flows.  Figure 12 shows a representation of air velocity vectors distribution vertically when overshot ridge (OVR) was equipped in different wind directions. The recirculation zone of the airflow formed above the roof in simulated barn with south winds ( Figure 12A) was smaller than simulated barn with north winds ( Figure 12B). Therefore, as can be seen in Figure 12C, the recirculation zone was situated after the barn at windward gable wall height in the simulated barn with east and west winds. The south and north winds direction created the lowest air velocity values differences ( Figure 12A,B) and east and west winds produced the highest air velocity values differences ( Figures 12C). Airflow   Figure 11. Air velocity vectors obtained in the CFD simulation of the CBP barn equipped with elevated ridge (ELR) and using three wind directions-WDs: (A) south to north, (B) north to south and (C) east to west. Figure 12 shows a representation of air velocity vectors distribution vertically when overshot ridge (OVR) was equipped in different wind directions. The recirculation zone of the airflow formed above the roof in simulated barn with south winds ( Figure 12A) was smaller than simulated barn with north winds ( Figure 12B). Therefore, as can be seen in Figure 12C, the recirculation zone was situated after the barn at windward gable wall height in the simulated barn with east and west winds. The south and north winds direction created the lowest air velocity values differences ( Figure 12A,B) and east and west winds produced the highest air velocity values differences ( Figure 12C). Airflow entered through both sides the opening wall and owing to density differences between the inside and outside air, it immediately dropped to the floor. Single-sided ventilation tended to show comparatively lower air change rates but increased recirculation zone intensity on the surface of cover ( Figure 12A,B). This airflow then travelled toward the center of the building, heating up as it passed over the compost area before it eventually rose. A similar observation has already been reported by Norton et al. [17]. Figure 11. Air velocity vectors obtained in the CFD simulation of the CBP barn equipped with elevated ridge (ELR) and using three wind directions-WDs: (A) south to north, (B) north to south and (C) east to west. Figure 12 shows a representation of air velocity vectors distribution vertically when overshot ridge (OVR) was equipped in different wind directions. The recirculation zone of the airflow formed above the roof in simulated barn with south winds ( Figure 12A) was smaller than simulated barn with north winds ( Figure 12B). Therefore, as can be seen in Figure 12C, the recirculation zone was situated after the barn at windward gable wall height in the simulated barn with east and west winds. The south and north winds direction created the lowest air velocity values differences ( Figure 12A,B) and east and west winds produced the highest air velocity values differences ( Figures 12C). Airflow entered through both sides the opening wall and owing to density differences between the inside and outside air, it immediately dropped to the floor. Single-sided ventilation tended to show comparatively lower air change rates but increased recirculation zone intensity on the surface of cover ( Figure 12A,B). This airflow then travelled toward the center of the building, heating up as it passed over the compost area before it eventually rose. A similar observation has already been reported by Norton et al. [17].   Figure 13 shows the air velocity distribution in a vertical plan situated in the center of the CBP barn simulated equipped with different types of ridge vents for four wind directions. As evidenced in Figure 13A for the CBP barn equipped with closed ridge (CLR), the higher air velocity values was observed near to the compost area in east and west winds. However, in the near ridge region, both these winds directions failed to perform well with air velocity values around 0.1 m s −1 . The findings were sensitive to slight wind direction changes and therefore significant variation was found for all parameters measured. For the CBP barn equipped with open ridge (OPR; Figure 13B), the examination of the air velocity inside the barn above the compost bedding surface demonstrated that the values were very close at 0.2 m height from the ground. However, it can be observed that the air velocity values in the directions of the southerly and northerly winds rapidly increase in the ridge area. For the CBP barn equipped with open ridge with chimney (ORC; Figure 13C), the air velocity value above the compost area was lower in the south and north wind direction due to the drag effect of the sidewall planks. The air velocity values were lower near ridge opening in the east and west wind direction. For the CBP barn equipped with an elevated ridge (ELR), Figure 13D shows that the average air speed in the space between the top of the compost area and the barn roof was approximately half that of the outside wind, for all wind directions. Air velocity was much lower inside the barn than outside and its flow through ridge opening was systematically higher in the south and north wind directions. Finally, for the CBP barn equipped with overshot ridge (OVR; Figure 13E), the air velocity shows approximately the same values at 0.02 m above the compost area for all the wind directions tested, but values strongly decreased near the ridge opening in the east and west wind direction, then increased progressively from the ridge opening. average air speed in the space between the top of the compost area and the barn roof was approximately half that of the outside wind, for all wind directions. Air velocity was much lower inside the barn than outside and its flow through ridge opening was systematically higher in the south and north wind directions. Finally, for the CBP barn equipped with overshot ridge (OVR; Figure 13E), the air velocity shows approximately the same values at 0.02 m above the compost area for all the wind directions tested, but values strongly decreased near the ridge opening in the east and west wind direction, then increased progressively from the ridge opening.

Evaluation of the Types of Ridge Vents and Wind Direction
Maintaining active composting in a compost bedded pack barn is a real challenge during the winter months. It becomes difficult to start or restart a compost bedded pack barn in winter with low bacterial activity as the heat losses can easily outweigh the heat generated. Due to this, to select the best condition of ventilation in the winter weather, the CFD models were evaluated in the function of five types of ridge vents (CLR, OPR, ORC, ELR and OVR) and four wind directions (north, south, east and west) to promote greater percentage heated surfaces of the floor.
The analyses of variance for the five types of ridge vents and the four wind directions as a function of the percentage of heated floor area are shown in Table 5. No statistically significant differences were found (p > 0.05) between the types of ridge vents (p-value = 0.716) and the wind direction (p-value = 0.874).
Heating area percentage is an indicator of the efficiency of the composting process. This is achieved by an adequate selection of ridge opening and wind direction that maintains ideal microbiological conditions in terms of aeration and temperature with a range of 45-60 • C. The mean values of percentage of the heated floor area in the five types of ridge vents and the four wind directions are shown in Table 6. Statistically significant evidence was found to state that the means of the heating area percentage between simulations differed (Tukey test; p-value < 0.05). The highest percentage of heated floor of the surface area inside the CFD models were observed in treatments ORC and west to east wind direction. The type of ridge vent and wind direction that promoted greater cooling surface of the floor were the treatments ELR and the south to north wind direction. These results showed that the best ridge vent and wind direction in the winter weather were observed in the open ridge with chimney (ORC) and west to east, respectively.  This work provided the designer with practical knowledge on the behavior of natural ventilation due to wind direction and thermal buoyancy forces acting in the CBP under different ridge vent openings. By applying CFD simulation and experimental investigation, a methodology was prepared to determine the behavior of airflow caused by thermal buoyancy and wind direction. The innovation of the methodology can be described by the fact that some equations were formed to estimate air velocity and air temperature and determine which ridge vent opening was most efficient.

Cattle Dairy Compost Barn Building Validation Tests
In Figure 14, the behavior of the air velocity measurements in five real CBP barns with different roof types present in Kentucky was estimated in Table 4. Results showed that the empirical equation to determine V air was statistically significant (p-value < 0.0001) and it presented the lowest coefficient of determination of 0.8157 ( Figure 14D), being subsequently validated via a t test (p-value > 0.05). The adjusted equations were statistically significant (F test, p-value < 0.0001), providing an average error of 0.38 m/s. The variability of the V air real measured and simulated was higher for the OVR (Figure 14D), which presented an average and standard deviation equal to 0.63 ± 0.39 m/s and 0.58 ± 0.42 m/s, respectably. In such a CBP, the area with the lowest V air was observed in the north face, over the bed area, due to the structure of the barn that blocks and redirecting the air flow.
In the ELR (Figure 14C), the real and simulated air velocity values showed a lower average (0.56 and 0.52 m/s, respectably) and variation equal to 0.37 and 0.32 m/s, respectably. The region with the lowest V air occurred near the north face.

Cattle Dairy Compost Barn Building Validation Tests
In Figure 14, the behavior of the air velocity measurements in five real CBP barns with different roof types present in Kentucky was estimated in Table 4. Results showed that the empirical equation to determine Vair was statistically significant (p-value < 0.0001) and it presented the lowest coefficient of determination of 0.8157 ( Figure 14D), being subsequently validated via a t test (p-value > 0.05). The adjusted equations were statistically significant (F test, p-value < 0.0001), providing an average error of 0.38 m/s. The variability of the Vair real measured and simulated was higher for the OVR ( Figure 14D), which presented an average and standard deviation equal to 0.63 ± 0.39 m/s and 0.58 ± 0.42 m/s, respectably. In such a CBP, the area with the lowest Vair was observed in the north face, over the bed area, due to the structure of the barn that blocks and redirecting the air flow.
In the ELR ( Figure 14C), the real and simulated air velocity values showed a lower average (0.56 and 0.52 m/s, respectably) and variation equal to 0.37 and 0.32 m/s, respectably. The region with the lowest Vair occurred near the north face.
The worst situation was verified for the CBP with ORC ( Figure 14E), where Vair was less than 0.60 m/s in 48.9% of the barn area. On the other hand, in CBP equipped with OVR ( Figure 14D), Vair was greater than 1.0 m/s in 58.4% (real) and 42.1% (simulated) of areas respectively, showing that the systems used promoted the increase of such an attribute to levels close to adequate in most of the facilities.
The minimum and maximum average airflow velocities were 0.05 and 1.1 m/s, respectively. In all case, natural ventilation on this face of the barn became reduced, reducing heat exchanges with the environment and making surface temperature of bed composting lower.
In all CBP facilities evaluated, the Vair was lower than the recommended ( Figure 14). According to Black et al. (2013), in CBP facilities, the ventilation should be provided such that the Vair is close to 1.8 m/s throughout the entire CBP, so that it can dry the bed, remove gases and favor the heat exchanges between the animal and the environment. The worst situation was verified for the CBP with ORC ( Figure 14E), where V air was less than 0.60 m/s in 48.9% of the barn area. On the other hand, in CBP equipped with OVR ( Figure 14D), V air was greater than 1.0 m/s in 58.4% (real) and 42.1% (simulated) of areas respectively, showing that the systems used promoted the increase of such an attribute to levels close to adequate in most of the facilities.
The minimum and maximum average airflow velocities were 0.05 and 1.1 m/s, respectively. In all case, natural ventilation on this face of the barn became reduced, reducing heat exchanges with the environment and making surface temperature of bed composting lower.
In all CBP facilities evaluated, the V air was lower than the recommended ( Figure 14). According to Black et al. (2013), in CBP facilities, the ventilation should be provided such that the V air is close to 1.8 m/s throughout the entire CBP, so that it can dry the bed, remove gases and favor the heat exchanges between the animal and the environment.
The results also show that the use of mechanical ventilation in tropical conditions is necessary for the proper functioning of the system, since only the natural ventilation was not sufficient to promote V air values according to the recommendation for CBP barns.

Conclusions
The 3D CFD model was established to graphically show the air velocity (V air ) distribution in a CBP barn using different ridge vent openings with natural ventilation. The developed model provided good agreement with experimental measurements and it was able to identify the impact on airflow through the structure in a CBP barn. To date most published works on CFD simulation for dairy cattle facilities have been 2D, and only ventilation has been modeled with 3D CFD. We hope this developed model can contribute to the optimum design for CBP barn construction. It should also provide guidelines for modifying existing CBP barns towards more uniform and optimum temperature and air movement distribution, thus increasing air quality and cow comfort. Research employing this model or other models with similar characteristics are needed to simulate more accurately the effect on airflow through the structure in CBP barns with dairy cows. These results showed that the best ridge vent and wind direction in the winter weather was an open ridge with chimney positioned from west to east.
The air velocity values simulated by the computational model were similar to those observed in practice. Results showed that the empirical equation to determine V air was statically significant (p-value < 0.0001) and it presented a coefficient of determination of 0.8157, being subsequently validated via a t test (p-value > 0.05).