数据与分析

案例研究:用于海上油田开发大规模油井建模的智能体人工智能框架

ONGC 的两个例子表明,监督式 AI 驱动的自动化如何将油井建模扩展到数百口海上油井,节省了 1000 多个工程工时。

印度近海油气生产平台。资料来源:印度石油天然气公司(ONGC)。
印度近海油气生产平台。
资料来源:印度石油天然气公司(ONGC)。

油井建模是人工举升系统生产工程的基础性活动。工程师们通常会构建基于物理的模型来匹配流动梯度测量(FGS)数据,生成流入性能关系(IPR)和垂直举升性能(VLP)关系,分析压力-温度(PT)剖面,并评估油管尺寸和气举敏感性。

这些工作流程直接支持与生产优化、增产计划和液位诊断相关的决策。然而,在实践中,此类建模仍然高度依赖人工且耗时。

对于单个油井而言,在商业模拟器中构建和校准基于物理的模型通常需要几个小时的集中工程努力。

当油井数量增加到数百口时(这在大型海上油气开发中很常见),这项工作将变得异常缓慢。因此,许多研究要么被推迟,要么仅限于部分油井,要么为了满足时间限制而简化。这些做法都可能影响决策质量。

为了应对这种可扩展性挑战,印度石油天然气公司(ONGC)部署了智能体人工智能(AI)。智能体人工智能实现了一个自动化框架,能够在工程团队的监督下,以快速且可重复的方式完成大规模油井建模(图 1)。

图 1——用于自动化油井建模的 AI 赋能命令行界面工具的运行情况。来源:ONGC。
图 1 为用于自动油井建模的 AI 启用命令行界面工具的运行情况。
来源:ONGC。

该框架将特定领域的 Python 库与运行在 SLB Pipesim 引擎上的 AI 驱动命令行代理集成在一起。其核心目标并非取代工程判断,而是消除重复的手动步骤,使工程师能够专注于结果解释和决策,而不是模型构建。

智能体人工智能架构

自动化框架由三个紧密集成的组件构成。

油井分析 Python 库

我们开发了一个名为 well-analysis 的自定义 Python 库,用于封装 Pipesim 中最常用的油井建模操作。该库提供简洁且可重用的函数,用于定义油管几何形状和完井配置、黑油 PVT(压力-体积-温度)特性、油藏输入和产能模型、人工举升设置、IPR 生成、VLP 相关性选择、PT 剖面分析、节点分析以及基于 FGS 的模型校准。

传统的 Pipesim 脚本编写方式,每个建模场景通常需要超过 100 行代码才能完成这些任务。而使用该库,同样的操作通常可以用不到五行代码实现,这极大地简化了自动化、维护和重用过程。

小型语言模型代理

一个由小型语言模型 (SLM) 驱动的轻量级人工智能代理负责协调建模工作流程。该代理通过模型上下文协议服务器与模拟器通信,该服务器将油井分析库的功能作为可操作的工具公开出来。

工程师提供高级自然语言指令,例如根据数据文件构建和校准模型、生成 IPR-VLP 和 PT 图,或执行管路灵敏度研究。代理程序将这些指令转换为结构化的执行步骤,同时保持输入、操作和输出的完整可追溯性。

文件驱动接口和验证

该代理程序可读取格式较为松散的 Excel 或 CSV 文件,这些文件包含油井和勘测数据。由于现场数据在结构和完整性方面往往存在差异,因此第一步是自动发现和验证数据模式。缺失或不一致的输入会被标记出来,而不是被默认接受,因为油井建模对安全性和决策至关重要。

经过验证的数据随后用于自动构建基于 Pipesim 物理的模型,执行基于 FGS 的迭代校准,并生成所需输出。结果写入结构化的输出目录,其中包括图表、电子表格和执行日志。

在系统开发过程中,一组生产工程师在 Pipesim 中独立地手动重建了一部分模型,并将其与代理生成的模型进行了比较。结果发现,自动生成的模型与手动构建的模型完全一致,这极大地增强了运行信心。

自动化油井建模工作流程

图 2展示了智能体 AI 框架的端到端执行工作流程。该流程始于用户通过命令行界面启动 AI 智能体,并提供包含井和勘测信息的松耦合 Excel 或 CSV 数据集。由系统生命周期管理 (SLM) 驱动的智能体首先编译并验证输入数据结构。如果缺少任何必要信息或信息不一致,智能体会立即向用户请求澄清,然后再继续执行。

图 2——智能 AI 井建模框架的端到端执行工作流程。来源:ONGC。
图 2——智能 AI 建模框架的端到端执行工作流程。
来源:ONGC。

输入验证通过后,代理程序会使用内部开发的油井分析 Python 库生成可执行的模拟代码。该库抽象了 Pipesim 模型构建的所有组件,包括几何形状、流体属性、油藏定义和人工举升参数。编译后的代码随后由 Pipesim 引擎以批处理模式执行。

在执行过程中,系统会生成详细的日志文件,并由代理持续分析这些文件,以检测收敛问题、数值不稳定或数据不一致等情况。如果执行失败,代理会自动重新配置工作流程或请求用户提供额外输入。成功完成后,所有请求的仿真输出,包括IPR-VLP结果、PT曲线和灵敏度分析,都会自动整理并存储在指定的输出文件夹中。

这种闭环执行设计能够实现完全自主、但由工程师监督的大规模油井建模,并内置验证、测井和恢复机制。

案例研究 1:用于仿真规划支持的大规模模型生成

该框架的首次应用涉及一个大型海上油气开发项目,该项目包含约600口油井。工程团队需要更新和校准后的油井模型,以支持增产方案的制定。按照传统的工作流程,手动构建和校准如此大量的模型需要耗费数月的持续工程时间。

主要挑战在于规模而非概念上的复杂性。工程师们必须整合各种异构数据集,构建井模型,匹配FGS数据,并为每口井生成图表。即使以每位工程师每天处理四到五口井的乐观速度计算,这项任务也需要超过1000个工程工时。

利用智能体人工智能框架,工程团队整合了已验证的输入数据,并以批量模式启动了自动化模型构建和校准。验证规则确定后,约600口井的全部数据在一夜之间完成处理。

从运营角度来看,最显著的成果是工程时间的大幅缩短。以往需要数月人工分散完成的工作,现在只需一天即可通过自动化监控完成。

工程师们将工作重心转移到审查异常情况并将输出结果整合到仿真规划工作流程中。保守估计,本案例研究中节省的总工时超过 700 个工程小时,且未影响模型的一致性或质量。

案例研究 2:管径优化和液体负荷诊断

第二个案例研究涉及三个海上油田,这些油田包含连续气举井和自流井。研究目标是建立校准后的油井模型,并开展大规模油管尺寸敏感性研究,以评估整个油田的液载情况。

三个油田共定义了370个模拟场景。对于每个场景,智能体构建了校准后的基础井模型,应用了指定的油管配置,并生成了相应的压力测试和节点分析结果。

所有370次模拟均在不到1小时的实际运行时间内自动完成。自动化工作流程将原本需要大量人工建模的工作量减少到仅需几个小时的监督审核和结果解读。预计净节省超过320个工程工时,同时实现了对所有井群的油管敏感性评估。

结果和运营影响

在这两个案例研究中,智能体人工智能框架的运行优势主要体现在工程时间压缩和工作流程可扩展性方面:

  • 劳动力影响——以前需要数周或数月才能完成的大型建模工作,现在只需几个小时即可完成。这两个项目总共节省了超过1000个工程工时。
  • 可扩展执行——相同的工作流程无需修改即可支持数十到数百口井。
  • 可重复性和可审计性——结构化的输出和日志文件确保了结果的完全可追溯性。

从组织角度来看,该框架改变了工程师与仿真交互的方式。建模不再被视为瓶颈环节,而成为一种可以快速迭代的分析工具,能够随着现场条件的变化反复应用。

实施经验

部署过程中总结出了一些实际经验:

  1. 只有建立在规范的数据管理基础上,自动化才能成功。早期的工作重点在于标准化单位、命名规则和FGS元数据。
  2. 工程师必须始终参与监督流程。代理会标记不完整的数据,但最终验证仍由生产工程师负责。
  3. 透明度对于系统的推广至关重要。工程师一旦能够追溯到 Pipesim 底层操作的每一步,就更愿意信任该系统。
  4. 最大的好处来自于大批量、重复性的工作流程,例如批量校准和灵敏度分析。

结论

本研究表明,利用智能体人工智能框架,可以将大规模油井建模从劳动密集型的瓶颈环节转变为快速、可扩展且由工程师监督的工作流程。通过将特定领域的Python库与运行在Pipesim上的AI驱动命令行代理集成,可以在不损失物理精度的前提下,实现常规模型构建、基于FGS的校准和标准分析的自动化。

在两项海上案例研究中,涉及超过 600 口油井和 370 个油管敏感性场景,建模周期从数月缩短至数小时,累计节省超过 1000 个工程工时。该框架使工程师能够专注于结果解读和决策,而非重复的模型构建,从而为大型生产资产中油井建模工作流程的扩展提供了切实可行的途径。

阿曼·夏尔马 (Aman Sharma, SPE) 是一位人工智能和云计算专家,在机器学习、大型语言模型、强化学习和云原生系统领域拥有超过 7 年的经验。他目前是印度孟买 ONGC 研发部门的执行工程师。他的工作重点是为工业应用开发生产级人工智能解决方案,包括智能体人工智能解决方案、检索增强型知识生成系统、视觉语言模型以及用于油气作业的优化框架。他的研究兴趣包括工业人工智能、优化算法、机器学习操作和数据驱动的能源系统。他是谷歌云平台和亚马逊网络服务认证的解决方案架构师和机器学习专家,并荣获印度普拉亚格拉杰国家技术学院颁发的七枚工程卓越金奖。

原文链接/JPT
Data & Analytics

Case Study: An Agentic AI Framework for Large-Scale Well Modeling of Offshore Field Developments

Two examples from ONGC show how supervised AI-driven automation scaled well modeling across hundreds of offshore wells, saving more than 1,000 engineering hours.

Oil and gas production platforms offshore India. Source: Oil and Natural Gas Corporation (ONGC).
Oil and gas production platforms offshore India.
Source: Oil and Natural Gas Corporation (ONGC).

Well modeling is a foundational activity in production engineering for artificial lift systems. Engineers routinely construct physics-based models to match flowing gradient survey (FGS) data, generate inflow performance relationship (IPR) and vertical lift performance (VLP) relationships, analyze pressure-temperature (PT) profiles, and evaluate tubing-size and gas-lift sensitivities.

These workflows directly support decisions related to production optimization, stimulation planning, and liquid-loading diagnostics. In practice, however, such modeling remains highly manual and time intensive.

For a single well, constructing and calibrating a physics-based model in a commercial simulator often requires several hours of focused engineering effort.

When the number of wells increases to hundreds, as is common in large offshore developments, the task becomes prohibitively slow. As a result, many studies are either deferred, restricted to limited subsets of wells, or simplified to meet time constraints. Each of these approaches may compromise decision quality.

To address this scalability challenge, agentic artificial intelligence (AI) was deployed for India’s Oil and Natural Gas Corporation (ONGC). The agentic AI enabled an automation framework that could complete large-scale well modeling in a rapid and repeatable manner while under the supervision of engineering teams (Fig. 1).

Fig. 1—An AI-enabled command-line interface tool in operation for automated well modeling. Source: ONGC.
Fig. 1—An AI-enabled command-line interface tool in operation for automated well modeling.
Source: ONGC.

The framework integrates a domain-specific Python library with an AI-driven command-line agent operating on SLB’s Pipesim engine. The central objective is not to replace engineering judgment, but to remove repetitive manual steps so that engineers can focus on interpretation and decision-making rather than model construction.

Agentic-AI Architecture

The automation framework consists of three tightly integrated components.

Well-Analysis Python Library

A custom Python library, named well-analysis, was developed to encapsulate the most common well-modeling operations in Pipesim. The library provides compact and reusable functions to define tubular geometry and completion configuration, black-oil PVT (pressure-volume-temperature) properties, reservoir inputs and productivity models, artificial-lift settings, IPR generation, VLP correlation selection, PT profiling, nodal analysis, and FGS-based model calibration.

Conventional Pipesim scripting for these tasks often exceeds 100 lines of code per modeling scenario. Using the library, the same operations can typically be expressed in fewer than five lines, which dramatically simplifies automation, maintenance, and reuse.

Small Language Model Agent

A lightweight AI agent powered by a small language model (SLM) orchestrates the modeling workflow. The agent communicates with the simulator through a model context protocol server that exposes the functions of the well-analysis library as actionable tools.

Engineers provide high-level natural-language instructions such as building and calibrating models from a data file, generating IPR-VLP and PT plots, or executing tubing sensitivity studies. The agent translates these instructions into structured execution steps while preserving full traceability of inputs, actions, and outputs.

File-Driven Interface and Validation

The agent ingests loosely formatted Excel or CSV files containing well and survey data. Because field data often vary in structure and completeness, the first step is automated schema discovery and validation. Missing or inconsistent inputs are flagged instead of being silently assumed, since well modeling is safety- and decision-critical.

Validated data are then used to automatically construct Pipesim physics-based models, perform iterative FGS-based calibration, and generate the requested outputs. Results are written to a structured output directory, including plots, spreadsheets, and execution logs.

During system development, a group of production engineers independently recreated a subset of models manually inside Pipesim and compared them with agent-generated models. The automated outputs were found to be fully consistent with manually constructed models, which established strong operational confidence.

Automated Well-Modeling Workflow

The end-to-end execution workflow of the agentic AI framework is illustrated in Fig. 2. The process begins when the user initiates the AI agent through the command-line interface and provides loosely coupled Excel or CSV data sets containing well and survey information. The agent, driven by a SLM, first compiles and validates the input data structure. If any mandatory information is missing or inconsistent, the agent immediately requests clarification from the user before proceeding.

Fig. 2—The end-to-end execution workflow of the agentic AI well-modeling framework. Source: ONGC.
Fig. 2—The end-to-end execution workflow of the agentic AI well-modeling framework.
Source: ONGC.

Once the inputs are verified, the agent generates executable simulation code using the in-house well-analysis Python library. This library abstracts all Pipesim model-building components, including geometry, fluid properties, reservoir definitions, and artificial-lift parameters. The compiled code is then executed by the Pipesim engine in batch mode.

During execution, detailed log files are generated and continuously analyzed by the agent to detect convergence issues, numerical instability, or data inconsistencies. If execution is unsuccessful, the agent automatically reconfigures the workflow or requests additional user input. Upon successful completion, all requested simulation outputs, including IPR-VLP results, PT profiles, and sensitivity analyses, are automatically organized and stored in a dedicated output folder.

This closed-loop execution design enables fully autonomous, yet engineer-supervised, large-scale well modeling with built-in validation, logging, and recovery mechanisms.

Case Study 1: Large-Scale Model Generation for Stimulation-Planning Support

The first application of the framework involved a large offshore development consisting of approximately 600 wells. The engineering team required updated and calibrated well models to support a stimulation-planning exercise. Under conventional workflows, building and calibrating this number of models manually would have required several months of continuous engineering effort.

The primary challenge was scale rather than conceptual complexity. Engineers had to assemble heterogeneous data sets, construct well models, match FGS data, and generate plots for each well. Even at an optimistic rate of four to five wells per engineer per day, the task would have exceeded 1,000 engineering hours.

Using the agentic AI framework, the engineering team consolidated validated input data and initiated automated model construction and calibration in batch mode. Once validation rules were finalized, the entire population of approximately 600 wells was processed overnight.

From an operational perspective, the most significant outcome was the drastic reduction in engineering time. What would normally have required months of distributed manual effort was completed within a single day of supervised automation.

Engineers redirected efforts toward reviewing exceptions and integrating outputs into stimulation-planning workflows. Conservatively, the total time saved in this case study exceeded 700 engineering hours, without compromise in modeling consistency or quality.

Case Study 2: Tubing-Size Optimization and Liquid-Loading Diagnostics

The second case study involved three offshore fields containing a mixture of continuous gas-lift and self-flowing wells. The objective was to prepare calibrated well models and execute large-scale tubing-size sensitivity studies to evaluate liquid-loading behavior across the asset.

A total of 370 simulation scenarios were defined across the three fields. For each scenario, the agent constructed the calibrated base well model, applied the specified tubing configuration, and generated the corresponding PT and nodal analysis results.

All 370 simulations were executed automatically in under 1 hour of wall-clock time. The automated workflow reduced what would otherwise be a large manual modeling effort to only a few hours of supervisory review and result interpretation. The estimated net saving exceeded 320 engineering hours, while enabling comprehensive tubing-sensitivity evaluation across the full well population.

Results and Operational Impact

Across both case studies, the operational benefits of the agentic AI framework were realized primarily through engineering time compression and workflow scalability:

  • Labor impact—Large modeling exercises that previously required weeks or months were completed in hours. Combined savings across the two projects exceeded 1,000 engineering hours.
  • Scalable execution—The same workflow supported tens to hundreds of wells without modification.
  • Repeatability and auditability—Structured outputs and log files ensured complete traceability of results.

From an organizational standpoint, the framework changed how engineers interact with simulation. Instead of treating modeling as a bottleneck activity, it became a fast-turnaround analytical tool that could be applied repeatedly as field conditions evolve.

Implementation Lessons

Several practical lessons emerged during deployment:

  1. Automation succeeds only with disciplined data management. Early efforts focused heavily on standardizing units, naming conventions, and FGS metadata.
  2. Engineers must remain in the supervisory loop. The agent flags incomplete data, but final validation remains the responsibility of the production engineer.
  3. Transparency is essential for adoption. Engineers were more willing to trust the system once they could trace every step back to underlying Pipesim operations.
  4. The greatest benefits arise from high-volume, repetitive workflows such as bulk calibration and sensitivity analysis.

Conclusions

This study demonstrates that large-scale well modeling can be converted from a labor-intensive bottleneck into a rapid, scalable, and engineer-supervised workflow using an agentic AI framework. By integrating a domain-specific Python library with an AI-driven command-line agent operating on Pipesim, routine model construction, FGS-based calibration, and standard analyses are automated without loss of physics fidelity.

Across two offshore case studies involving more than 600 wells and 370 tubing-sensitivity scenarios, modeling turnaround time was reduced from months to hours, with cumulative savings exceeding 1,000 engineering hours. The framework enables engineers to focus on interpretation and decision-making rather than repetitive model building, providing a practical pathway to scale well-modeling workflows in large producing assets.

Aman Sharma, SPE, is an AI and cloud computing specialist with over 7 years of experience in machine learning, large language models, reinforcement learning, and cloud-native systems. He is currently an executive engineer in the research and development division of ONGC, Mumbai, India. His work focuses on developing production-grade AI solutions for industrial applications, including agentic AI solutions, retrieval-augmented generation knowledge systems, vision-language models, and optimization frameworks for oil and gas operations. His research interests include industrial AI, optimization algorithms, machine learning operations, and data-driven energy systems. He is a Google Cloud Platform and Amazon Web Services certified solutions architect and machine learning specialist, and a recipient of seven gold medals for engineering excellence from the National Institute of Technology, Prayagraj, India.