Abstract:
Although computational fluid dynamics (CFD) is widely used for simulating airflow in livestock and poultry housing, its requirement for geometric model simplification in large and structurally complex pig houses limits the simultaneous high-precision simulation of both whole-space airflow and localized microenvironments. However, pigs are highly sensitive to their immediate surroundings, which directly determines their thermal comfort and health status. This study introduced a mesh-free, data-driven approach—Physics-Informed Neural Networks (PINN)—to investigate different sampling methods and the representation of three-dimensional gas flow field reconstruction in a swine barn scenario. Experiments were conducted in November 2024 at the laboratory of China Agricultural University. The study primarily employed PINN in both two-dimensional (2D) and three-dimensional (3D) configurations, using validated experimental and CFD models as benchmarks, while experimental data and CFD simulation data served as comparative datasets. The root mean square error (RMSE) between the predicted values from PINN and the true values was used as the evaluation metric for prediction error. The 2D experiments were divided into 24 groups, corresponding to four sampling methods—Random Sampling (RS), Latin Hypercube Sampling (LHS), Velocity Magnitude Importance Sampling (MIS), and Velocity Gradient Importance Sampling (GIS)—each applied at six sampling accuracy levels (0.18%, 0.36%, 0.72%, 1.08%, 1.8%, and 3.6%) to evaluate velocity field reconstruction performance. The RS method was sampled randomly, while the LHS method employed quasi-uniform sampling through the Latin Hypercube approach. In contrast, both the MIS and GIS methods were identified as distinct feature-based sampling techniques, with their sampling criteria based on velocity magnitude and velocity gradient respectively. The optimal K-value for proximity was determined via 5-fold cross-validation, and a one-way ANOVA was performed on the sampling accuracy across the four methods to assess significant differences in reconstruction performance. Each experimental group was subjected to multiple repeated trials. To avoid the complexity of highly turbulent flows, the 3D experiment focused on a single pig model in a unidirectional airflow environment, exploring the performance of 3D PINN in reconstructing velocity fields in a swine barn setting. The results were compared with CFD simulations under the same conditions, The discrepancy between the PINN predictions and the true values was graphically illustrated, and quantitative analyses—including RMSE and velocity deviation percentage at the vortex region near the rear of the pig body—were conducted to validate the applicability of 3D PINN in such scenarios. The findings revealed that: 1) A significant negative correlation was observed between sampling accuracy and reconstruction error (P < 0.05). At lower accuracy levels, the GIS method reduced the prediction error by approximately 30%, 50%, and 21% compared to the other methods, respectively. Conversely, under higher accuracy conditions, the prediction error of the LHS method was approximately 2 to 3 times higher than that of the other methods. 2) Under experimental conditions, the 3D PINN achieved a prediction error of only 12.3%, demonstrating satisfactory reconstruction performance. The results indicate that both the physical characteristics of the training samples and the sample size significantly influence the training effectiveness of the PINN, which also demonstrates strong applicability for reconstructing airflow fields in swine barn environments. Although the PINN method eliminates the dependency of traditional CFD approaches on mesh generation and boundary conditions, its capability to capture turbulent information in high Reynolds number scenarios does not meet the expected requirements, and the accuracy of the reconstructed results still requires further improvement.