首页> 外文期刊>Computational Geosciences >A backward automatic differentiation framework for reservoir simulation
【24h】

A backward automatic differentiation framework for reservoir simulation

机译:用于油藏模拟的后向自动微分框架

获取原文
获取原文并翻译 | 示例
       

摘要

In numerical reservoir simulations, Newton's method is a concise, robust and, perhaps the most commonly used method to solve nonlinear partial differential equations (PDEs). However, as reservoir simulators incorporate more and more physical and chemical phenomena, writing codes that compute gradients for reservoir simulation equations can become quite complicated. This paper presents an automatic differentiation (AD) framework that is specially designed for simplifying coding and simultaneously maintaining computational efficiency. First a parse tree for a mathematical expression is built and evaluated with the backward mode AD, and then the derivatives with respect to the expression's arguments are transformed to derivatives with respect to the PDE's independent variables. The first stage can be realized either by runtime polymorphism to gain higher flexibility or by compile-time polymorphism to gain faster execution speed; the second stage is realized by linear combinations of sparse vectors, which can be accelerated by recording the target column indices. The AD framework has been implemented in an in-house reservoir simulator. Individual tests on some complex mathematical expressions were carried out to compare the speed of the manual implementation, the runtime polymorphic implementation and the compile-time polymorphic implementation of the differentiation. Then the performance of the three was analyzed in complete simulations. These cases indicate that the proposed approach has good efficiency and is applicable to reservoir simulations.
机译:在数值储层模拟中,牛顿法是一种简洁,鲁棒的方法,也许是解决非线性偏微分方程(PDE)的最常用方法。但是,随着油藏模拟器包含越来越多的物理和化学现象,编写用于计算油藏模拟方程梯度的代码可能变得相当复杂。本文提出了一种自动微分(AD)框架,该框架专门设计用于简化编码并同时保持计算效率。首先,为数学表达式建立一个解析树,并使用后向模式AD对其进行评估,然后将有关表达式自变量的导数转换为关于PDE自变量的导数。第一阶段可以通过运行时多态来获得更高的灵活性,也可以通过编译时多态来实现更快的执行速度来实现。第二阶段是通过稀疏向量的线性组合实现的,可以通过记录目标列索引来加速。 AD框架已在内部水库模拟器中实现。对一些复杂的数学表达式进行了单独的测试,以比较手动实现,运行时多态实现和编译时的多态实现的速度。然后在完整的仿真中分析了这三个的性能。这些情况表明,所提方法具有良好的效率,适用于油藏模拟。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号