Airflow around livestock barns may sound like a niche corner of engineering, but it sits at the heart of one of agriculture’s most pressing problems: measuring and ultimately reducing the methane, carbon dioxide, nitrous oxide and ammonia that the livestock sector releases into the atmosphere. In Europe, dairy and increasingly pig housing rely on natural ventilation, which means the gases that must be measured are present at very low concentrations and are distributed highly unevenly in space and time. Accurate emission measurements under these conditions demand expensive instrumentation and considerable personnel, so scientific studies are usually restricted to a handful of farms. A new study published in Results in Engineering suggests that a decades-old but underused computational technique, the lattice Boltzmann method, could dramatically accelerate the simulations needed to fill the gaps between low-cost sensors and bring near-real-time airflow prediction within reach.
The research, carried out by Baptiste Moreau, Alfonso Caiazzo, Thomas Amon, Long Chen and David Janke, set out to evaluate an open-source lattice Boltzmann solver called OpenLB against the established finite volume solver OpenFOAM. Conventional computational fluid dynamics tools used in agriculture solve the Navier–Stokes equations with finite volume or finite element methods, approaches that have been extensively validated over decades and are embedded in mature commercial and open-source packages. Their weakness is computational cost: as turbulence develops and domains grow, simulations can run for hours or days, which makes them poorly suited to applications where predictions are needed quickly, such as interpreting data streaming from barn-integrated sensor networks.
The lattice Boltzmann method takes a fundamentally different route to the same physics. Instead of discretizing the Navier–Stokes equations directly, it evolves a pseudo-compressible formulation on a fixed Cartesian lattice, tracking population densities that represent particles moving along a discrete set of velocities, commonly nineteen directions in three dimensions, the so-called D3Q19 model. Each time step consists of a collision step, in which the densities relax toward an equilibrium distribution described by the Bhatnagar–Gross–Krook operator, and a propagation step, in which information moves to neighboring nodes. The crucial property is locality: the collision step, which carries most of the computational burden, depends only on values at a single lattice node. Combined with a structured grid and explicit time-stepping, this makes the method exceptionally well suited to massive parallelization on modern hardware, including graphics processing units.
To test whether this promise holds for agricultural flows, the team built a benchmark that others can easily reproduce. They used a 1:100 scaled model of a typical agricultural building, 0.25 meters wide and 0.13 meters high, mounted perpendicular to the flow in the atmospheric boundary layer wind tunnel at the ATB Potsdam. The model, originally part of a dairy farm study, was elevated on a smooth table to minimize the influence of the tunnel’s thick boundary layer, producing an inflow with a nearly constant vertical velocity and turbulence profile. With the barn height as the characteristic length and an inlet velocity of 13 meters per second, the flow reached a Reynolds number of roughly 114,000, firmly in the turbulent regime. Velocity measurements were collected along fourteen vertical sample lines upstream and downstream of the model.
On the computational side, the barn geometry was supplied as an STL file and embedded in a domain about three meters long, 0.98 meters high and two meters wide. OpenLB generates a uniform lattice whose spacing is set by a refinement parameter, which the researchers varied from coarse grids of about 115,000 cells to finely resolved lattices exceeding 50 million cells. No-slip conditions on the ground and barn surfaces were enforced with a second-order interpolation scheme due to Bouzidi, a uniform inlet velocity was ramped up smoothly to suppress nonphysical oscillations, and slip conditions closed the top and sides. Turbulence was handled with the Smagorinsky large-eddy subgrid model, implemented in the lattice Boltzmann framework by adding an eddy viscosity to the relaxation time, with a Smagorinsky constant of 0.15 chosen after a preliminary sensitivity study.
The accuracy assessment compared time-averaged velocity components against the wind tunnel data using a battery of error metrics, including mean relative error, mean absolute error, root mean square error and a symmetric mean absolute percentage error. For the streamwise velocity, the simulation reproduced the qualitative trends of the experimental profiles along essentially all sampling lines, and about half of all measurement points showed relative errors below 13 percent. In regions dominated by the interaction with the building, such as lines immediately beside and behind the barn, agreement was partly very good, with errors below 5 percent. Larger deviations appeared for the vertical velocity component just upstream of the model, where the solver underestimated the measurements, possibly because a single constant Smagorinsky coefficient overestimates turbulent viscosity in the nearly turbulence-free inflow. The authors note that dynamic subgrid models and local grid refinement could improve these regions, and they emphasize that the achieved accuracy is consistent with previous validation studies of open-source solvers against comparable wind tunnel data.
The efficiency results are where the study becomes striking. Measured in million lattice updates per second, the CPU-based parallelization sustained roughly 100 MLUPs on refined meshes with 20 cores, at the upper end of values reported in the literature, and showed strong scaling with per-processor throughput declining only from 6.2 to 5.0 as core counts grew. Against OpenFOAM on the same grid, the lattice Boltzmann solver was about 23 times faster when both used 40 CPU cores, delivering a time ratio of 27 compared with 620 for the finite volume solver. The finite volume code’s scalability also broke down beyond roughly 35 cores, whereas OpenLB continued to benefit from additional processors. Moving to the server’s NVIDIA A100 GPUs brought a further speedup of about a factor of ten over MPI, reaching nearly 2,500 MLUPs on the finest meshes, a performance in line with the best lattice Boltzmann implementations reported elsewhere.
Combining these effects, the validated benchmark case achieved an overall acceleration of approximately 46-fold relative to the OpenFOAM reference, while for the most refined case examined, about 22 million cells, the combined CPU and GPU gains suggest a potential speedup approaching 230-fold, a figure the authors present as an indication of scalability rather than a validated result. True real-time simulation, where computation keeps pace with simulated time, was not achieved: GPU runs showed time ratios between 10 and 100. Even so, the researchers point out that multiple GPUs could close much of the remaining gap, and that the approach is already accessible far beyond supercomputing centers, since graphics cards with around 6,000 CUDA cores suitable for such computations are available for roughly 600 euros, raising the prospect of transient airflow simulations on a standard laptop.
The authors are careful to delineate the limits of their findings. The benchmark used a closed building, a nearly uniform inflow profile and an incompressible turbulent flow on a structured Cartesian lattice, precisely the class of problems for which the lattice Boltzmann method is best suited. More realistic scenarios involving internal ventilation, complex geometries, turbulent approaching flows or strongly coupled transport processes may show smaller efficiency gains and require case-by-case evaluation. A key constraint of the current solver version is its multi-block approach, which does not yet support local grid refinement, forcing uniform fine resolution across the entire domain and straining GPU memory in multiscale problems; a forthcoming release with local refinement is expected to be assessed in future work. Nevertheless, the study concludes that the open-source framework delivers accuracy comparable to established finite volume solvers at a fraction of the computational cost, positioning lattice Boltzmann methods as a credible foundation for the fast, transient dispersion simulations needed to quantify and mitigate emissions from naturally ventilated livestock buildings.
Subject of Research: Performance assessment of an open-source lattice Boltzmann framework for accelerated turbulent airflow simulation around agricultural buildings
Article Title: Accelerating airflow simulations for agricultural applications: Performance assessment of an open-source lattice Boltzmann framework
Article References: Moreau, B., Caiazzo, A., Amon, T., Chen, L., & Janke, D. (2026). Accelerating airflow simulations for agricultural applications: Performance assessment of an open-source lattice Boltzmann framework. Results in Engineering, 32, Article 112822. https://doi.org/10.1016/j.rineng.2026.112822
Image Credits: AI Generated
DOI: 10.1016/j.rineng.2026.112822
Keywords: lattice Boltzmann method, OpenLB, computational fluid dynamics, livestock housing, natural ventilation, GPU computing, OpenFOAM, turbulence modeling, wind tunnel validation, agricultural emissions, high performance computing, near-real-time simulation
Cite Scienmag News
Audrey Campbell. (September 22, 2026). Open-Source Lattice Boltzmann Solver Speeds Barn Airflow Simulations. Scienmag. https://scienmag.com/open-source-lattice-boltzmann-solver-speeds-barn-airflow-simulations/
Audrey Campbell. "Open-Source Lattice Boltzmann Solver Speeds Barn Airflow Simulations." Scienmag, 22 September 2026, https://scienmag.com/open-source-lattice-boltzmann-solver-speeds-barn-airflow-simulations/. Accessed 22 September 2026.
Audrey Campbell. "Open-Source Lattice Boltzmann Solver Speeds Barn Airflow Simulations." Scienmag. September 22, 2026. https://scienmag.com/open-source-lattice-boltzmann-solver-speeds-barn-airflow-simulations/

