From Concentration to Flux: A Mechanistic Model for Accurate Methane Emission Estimates in Livestock
Description
This dataset contains MATLAB source code used to implement the hybrid multiphysics framework described in the manuscript titled "A Physics-Based Framework for Accurate On-Farm Enteric Methane Sensing." The software models the complete emission-to-sensor pathway for methane released during cattle eructation events, integrating physiological control volume analysis with a transient buoyant puff model. The main script is MassConservationV05.m, which simulates methane transport through four interconnected control volumes representing the rumen, lungs, local environment, and sampling device. It applies the Reynolds Transport Theorem to derive time-resolved methane concentrations and mass fluxes in each compartment. The second core script is Solve_bovine_puffV04_integration.m, which couples the output of the control volume model to a puff-based fluid dynamics model. This code initializes the puff using integrated physiological parameters and solves a system of ordinary differential equations to predict the spatiotemporal evolution of methane concentration and velocity fields. Two supporting functions are included: PuffSolver.m: Solves the puff trajectory and concentration field using Gaussian self-similar profiles and conservation laws for momentum, buoyancy, and scalar transport. BelchProfileGenerator.m: Generates a lognormal flow profile representing the temporal shape of a belching event, which serves as input to the control volume model. All files are written in MATLAB and are compatible with versions R2021a and later. Users can modify physiological parameters, environmental conditions, and sensor configurations to simulate different scenarios. The software is intended to support researchers working on methane sensing, livestock emissions modeling, and sensor calibration. To run the full simulation: Start with MassConservationV05.m to simulate the control volume system. Then run Solve_bovine_puffV04_integration.m to compute the puff evolution and sensor capture fraction. Use the supporting functions as needed to customize the emission profile and puff behavior. This software supports the reproducibility and extension of the results presented in the associated manuscript and is intended for open scientific use.
Files
Institutions
Categories
Funding
Bezos Earth Fund
G-2023-201305638