Abstract
Drilling operations that rely on managed pressure drilling increasingly depend on rapid interpretation of surface measurements while maintaining tight safety margins. The difficulty is amplified by persistent actuation at the choke and pumps, which induces transients that can resemble influx signatures, and by limited downhole observability that forces decisions to be made under structural ambiguity. In oil-based and synthetic-based fluids, gas can partially dissolve and induce swelling of the circulating liquid, shifting the relationship among pit-volume trends, pressures, and actual free-gas inventory in the annulus. This paper develops a factor-graph state estimation and decision layer that explicitly represents dissolution and swelling as latent thermodynamics-constrained states, while accommodating intermittent telemetry and sensor outages. The technical contribution is a sparse smoothing formulation that couples one-dimensional annular hydraulics summaries with a bounded thermodynamic partition model, encoded as inequality-constrained factors and thermodynamic-consistency priors, enabling stable inference when measurements are sparse, biased, and temporally correlated. A hybrid variational--Laplace inference scheme is derived to preserve positivity and phase-fraction bounds without nonphysical clipping, and an event-triggered telemetry policy is co-designed to maximize expected information gain subject to bandwidth constraints. The approach yields posterior distributions for free and dissolved gas inventories and for safety-relevant outputs, and it produces diagnostics that distinguish swelling-consistent pit gain from free-gas-driven compressibility signatures using posterior geometry rather than heuristic thresholds. Numerical experiments demonstrate improved ambiguity resolution under realistic actuation, closure uncertainty, and bias drift, with inference remaining stable under long telemetry gaps.