In the process of unconventional oil and gas reservoir exploitation, it is difficult to reduce drilling fluid lost in natural fractures, enhance the CO2 displacement effect and reduce foam drainage gas recovery costs. In most cases, foaming agents can solve these problems in a low-cost way in a short period of time. Foaming agent screening and evaluation is the key to this technology. However, there are few experimental tests used in the evaluation of foaming agent properties that match the actual unconventional oil or gas well conditions of high temperature and high pressure. Using the actual temperature and pressure conditions of a wellbore, the foaming capacity and half-life of two common foaming agents were systematically evaluated by using the high-temperature and high-pressure visual foam properties evaluation device (UPMX-500), in which the foaming agent’s volume concentration was 3‰ in a simulated formation water with a pH of 6 and salinity of 9 × 104 mg/L. The high-temperature (40 °C, 60 °C, 80 °C, 100 °C) and high-pressure (0.1 MPa, 6.0 MPa, 8.0 MPa, 10.0 MPa) effect on the foaming capacity and half-life was analyzed. Binary linear regression of pressure and temperature was carried out, taking the foam composite index as the target and using a formula with high correlation. The results showed that the foam composite index (FCI) of the two foaming agents was positively correlated with pressure and temperature. The correlation of UT-7 was FCI = 64.1196T + 735.713p − 2066.2, the correlation of HY-3K was FCI = 62.5523T + 7220.391p − 2415.6, and the coefficients of determination were 0.9799 and 0.9895, respectively, with an error of less than 10%. This correlation equation can provide a reference for accurately predicting the foaming capacity of foaming agents under high-temperature and high-pressure conditions and can also be used to optimize foaming agents or to qualitatively evaluate results for the efficient exploitation of unconventional oil and gas reservoirs.
With the deepening of unconventional oil and gas resource development, the gas–liquid two-phase flow phenomenon in horizontal gas wells is becoming increasingly complex. Accurate and efficient prediction of the flow state has become key to optimizing production. While traditional numerical simulation methods are highly accurate, their long calculation times make them unsuitable for real-time applications. Conversely, purely data-driven methods struggle with accuracy under sparse data conditions. This paper proposes a deep operator network method (PI-DeepONet) that integrates physical prior knowledge—specifically the drift-flux model—to rapidly predict two-phase flow parameters. By jointly training the network with both data loss and physical loss, the model’s accuracy and generalization are significantly enhanced. Comparing the results with the OLGA numerical simulator verifies the model’s high performance. The average relative error of the PI-DeepONet on the test set is less than 1%, with the error of some physical quantities controlled within 0.2%. Critically, the single prediction time is less than 0.1 s, achieving a calculation speed nearly 50,000 times higher than the traditional numerical simulation method. The model significantly improves prediction speed while ensuring accuracy, making it ideal for real-time simulation and rapid response requirements in horizontal wells. This study provides a new path for intelligent diagnosis and prediction of underground working conditions and demonstrates broad engineering application potential.
Plunger lift systems are vital for optimizing production in gas wells, but their performance can be compromised by various operational anomalies. Traditional diagnostic methods and conventional convolutional neural network (CNN) approaches often struggle with the complex, transient data from these systems, particularly in capturing long-range temporal dependencies and generalizing from limited, imbalanced datasets. This study presents an enhanced diagnostic framework for plunger lift anomaly detection by leveraging the strengths of a pre-trained Vision Transformer (ViT). The methodology transforms one-dimensional time-series pressure data into two-dimensional image representations using the element-wise summation of Gramian Angular Summation Field (GASF) and Gramian Angular Difference Field (GADF), which simultaneously preserves global operational trends and local transient dynamics for vision model analysis. The ViT model, initialized with pre-trained weights, is further optimized using Bayesian optimization (BO) for hyperparameter tuning, and a tailored data augmentation pipeline is employed to improve robustness. Comparative evaluations demonstrate that the proposed ViT-based approach, particularly the ViT + GAF + BO model, significantly outperforms baseline CNN models and their optimized variants, achieving the highest Precision, Recall, and F1-score, with an F1-score of 0.93. Visualizations using t-SNE confirm the ViT’s superior capability in learning discriminative features, showcasing well-separated clusters for different operational conditions compared to CNNs. This research underscores the potential of pre-trained ViTs combined with appropriate data representation and optimization techniques for achieving accurate and reliable anomaly detection in plunger lift systems.