微信一键登录

科吉思石油论坛

搜索
查看: 2820|回复: 0
打印 上一主题 下一主题

【FAQ】2 计算结果不同的原因 & 动态模拟中的“正确答案”

[复制链接]

136

主题

205

帖子

264

积分

中级会员

Rank: 3Rank: 3

积分
264
跳转到指定楼层
楼主
发表于 2020-6-16 12:31:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 乔聪颖 于 2020-11-3 16:51 编辑

2 Reasons for the difference in calculation results
2
计算结果不同的原因

In this section is given brief description of reasons for difference of tNavigator calculation results on various number of cores and difference between tNavigator calculation results and other simulators.
在本节中,简要描述了使用不同数量内核时tNavigator计算结果差异以及tNavigator计算结果与其他模拟器之间差异的原因。
Full description of notion "right answer" in dynamic modelling is given in section 7.3. This section gives a detailed answer to the following questions:
在第7.3节中将对动态模拟中的“正确答案”概念进行完整描述。本节对以下问题给出了详细的答案:
  • Model was calculated by tNavigator on different numbers of cores. We have different values of oil, water, gas production. Why does the answer depend on the number of cores? Which answer is correct?
  • 模型是由tNavigator在不同数量的内核上计算的,却得到了不同的油、水、气产量。为什么答案取决于内核数?哪个答案是正确的?
  • Model was calculated by tNavigator and other simulator. All the keywords in the model are supported by tNavigator, and there are no tNavigator-specific keywords that other simulator doesn't support, but difference in the results is significant. Why? How can I match together the results of tNavigator calculation and another simulator?
  • 模型是由tNavigator和其他模拟器计算的。tNavigator支持模型中的所有关键字,并且没有其他模拟器不支持的tNavigator独有关键字,但是结果差异很大。为什么?如何将tNavigator计算的结果和另一个模拟器进行匹配?
Usually, visible differences between tNavigator calculations on different number of cores and differences between tNavigator and another simulators calculation take place in models where there are:
不同核心数量的tNavigator计算之间的可见差异以及tNavigator与其他模拟器计算之间的差异通常发生在以下模型中:
  • group controls;
  • (井)组控制
  • economical limits WECON (see 13.20.76), GECON (see 13.20.123);
  • 经济极限WECON(参见13.20.76),GECON(参见13.20.123);
  • keywords ACTION (see 13.20.160), ACTIONG (see 13.20.161), ACTIONR (see 13.20.162), ACTIONW (see 13.20.163), ACTIONX (see 13.20.164);
  • 关键字ACTION(参见13.20.160)、ACTIONG(参见13.20.161)、ACTIONR(参见13.20.162)、ACTIONW(参见13.20.163)、ACTIONX(参见13.20.164);
  • well control mode is THP and VFP table number can change in case if user-defined ACTION condition takes place;
  • 井控模式为THP, VFP表号可在发生用户自定义ACTION条件触发时更改;
  • keywords UDQ (see 13.20.167).
  • 关键字UDQ(请参阅13.20.167)。
Difference in results in many cases occurs due to the fact that these keywords are triggered at different times in tNavigator calculation on different numbers of cores (or at different times in tNavigator calculation and another simulator calculation). Significant difference in
calculation can be obtained especially if we have long time steps.
在许多情况下,由于在不同数量的内核上(或在tNavigator计算和另一个模拟器计算中的不同时间)在tNavigator计算中的不同时间触发了这些关键字,因此导致结果差异。特别是如果我们有很长的时间步长,则可能计算结果可能出现显着差异。
Example:
DATES
1 JAN 2020 /
1 JAN 2021 /
1 JAN 2022 /
/  
示例
DATES
1 JAN 2020 /
1 JAN 2021 /
1 JAN 2022 /
/  
In the example the given length of time steps is one year. In the calculation process they are divided into small computational steps.
在示例中,给定的时间步长为一年。 在计算过程中,它们分为小的计算步。
If the keywords (that are listed above) trigger at different times, then it can lead to the situation when the well is closed in one case, but continues its operation otherwise.
如果关键字(上面列出的)在不同的时间触发,那么可能会导致在一种情况下关井,而另一种情况下继续(开井)。

Example 1 of possible difference in calculation results.
计算结果可能存在差异的示例1。
In the model there is one production well. We specify the economic constraint WECON (see 13.20.76), the well will be shut if it exceeds 90% watercut. We calculate on 4 cores. On the N-th time step the watercut is 90.00%. We calculate on 10 cores. The watercut is 89.99%. As a result, the well is shut on 4 cores calculation, by continues to produce in 10 core calculation. If this well rate is 30 cubic meters per day (and restrictions on the time step length is not set), the simulator immediately steps on 100 days (default maximum time step is 100 days – DTMAX in RUNCTRL, see 13.20.142). In this case, fluid production from these two options will vary by 30 cubic meters * 100 days = 3000 cubic meters. Water cut is 90%, so this means 300 cubic meters of oil.
该模型中有一个生产井。 我们指定了经济限制WECON(请参阅13.20.76),如果含水率超过90%,则井将关闭。 以4个内核进行计算,在第N个时间步,含水率是90.00%。 以10个内核计算,含水率是89.99%。 结果,在以4个内核计算的模型中,井被关闭,而在以10个内核计算的模型中,井继续生产。 如果该井产量为30立方米每天(并且未设置时间步长的限制),则模拟器会立即执行100天的步长(默认最大时间步长为100天– RUNCTRL中的DTMAX,请参阅13.20.142)。 在这种情况下,这两个选项的流体产量将相差30立方米* 100天= 3000立方米。 含水率为90%,意味着300立方米的油。

Example 2 of possible difference in calculation results.
计算结果可能存在差异的示例2。
In the model there is user-defined condition for ACTION (G, R, W, X).
在模型中,有用户自定义的ACTION(G,R,W,X)条件。
Example
DEFINE WUVFPTAB (WUVFPTAB 'W*'+(WUVFPTAB 'W*'< 5)*(WTHP 'W*'>45)+(WUVFPTAB 'W*'== 5)*(WGOR 'W*'> 1200)+(WSTAT 'W*'== 4))
示例
DEFINE WUVFPTAB (WUVFPTAB 'W*'+(WUVFPTAB 'W*'< 5)*(WTHP 'W*'>45)+(WUVFPTAB 'W*'== 5)*(WGOR 'W*'> 1200)+(WSTAT 'W*'== 4))
This condition can have significant influence on calculation results. The reason is that when THP exceeds 45 atmospheres and GOR exceeds 1200 then the VFP table number and well limits will be changed. Even a small fluctuation within the accuracy of numerical solution can lead to the fact that in one case the operation is triggered, and in other – no. Accordingly, the operation at different times can have significant influence on calculation results.
此条件可能会对计算结果产生重大影响。 原因是,当THP超过45个大气压且GOR超过1200时,VFP表号和井的限制将被更改。即使数值解的精度出现很小的波动,也可能导致以下事实:一种情况下会触发操作,而另一种情况下不会。 因此,不同时间的操作可能会对计算结果产生重大影响。

Question: Why does the answer depend on the number of cores?
问题:答案为何取决于内核数量?
The reason of different results on different number of cores is: the quality of number rounding and the preconditioner quality depend on the number of cores (preconditioner is the special matrix, which is constructed for solving systems of linear equations).
不同核数上的结果不同的原因是:舍入数的质量和预处理器的质量取决于核数(预处理器是为求解线性方程组而构造的特殊矩阵)。
An example of different number rounding.
不同数字舍入的示例。
Let there are 4 numbers to sum a;b;c;d .
令有4个数字相加a,b,c,d。
  • a+b+c+d – non-parallel programme code (for one core).
  • a+b+c+d – 非并行程序代码(用于一个内核)。
  • (a+b)+(c+d) – parallel programme code for two cores. In parentheses different cores sum numbers.
  • (a+b)+(c+d) – 两个内核的并行程序代码。在括号中,不同的核求和数。
The answer will be different because of rounding. Both answers are correct.
由于四舍五入,答案将有所不同。两个答案都是正确的。

Question: At what number of cores we obtain the most accurate result?
问题:在多少个内核上我们可以获得最准确的结果?
The question is not correct. All results are accurate and correct and they form a set of solutions. Any result inside the particular area is also a solution. We shouldn't call one number a correct solution. A solution is a set of solutions.
这个问题是不正确的。 所有结果都是精确和正确的,它们形成了一套解决方案。特定区域内的任何结果也是一种解决方案。我们不应该将一个数字称为正确的解决方案。解决方案是一组解决方案。
Uncertainty is present in the initial data. For example, we can construct a model porosity cube (from LOGs) different ways by using different interpolation methods. In fact, these will be different variants of one model. The uncertainty generated by numerical methods for solving systems of equations is significantly less than the uncertainty in the input data.
初始数据中存在不确定性。例如,我们可以使用不同的插值方法以不同的方式构造孔隙度模型(从LOGs)。实际上,这些是一个模型的不同变体。用数值方法求解方程组的不确定性明显小于输入数据中的不确定性。
Simulator does not solve the equations precisely. There is a numerical error in the solution (residual). It may be distributed differently on a different number of cores. However, even a small deviation in the solution on a specific step may lead to large differences in the results in the next step if the complex ACTION and economic constraints are used. The difference may be in the thousandth percent, but in one case the conditions have been triggered, and in the other – no. Further the results don’t match (see examples above).
模拟器无法精确求解方程式。解中有一个数字错误(残差)。它可能以不同的方式分布在不同数量的内核上。但是,如果使用复杂的ACTION和经济约束条件,则特定步骤的解决方案即使很小的偏差也可能导致下一步结果的较大差异。差异可能在千分之一中,但是在一种情况下,条件已经触发,而在另一种情况下,没有。此外,结果不匹配(请参见上面的示例)。
In this case we observe a model sensitivity to a particular combination of group controls, economic constraints and ACTIONs. Simulator works correctly in both cases.
在这种情况下,我们观察到模型对井组控制、经济约束和ACTION的特定组合的敏感性。在两种情况下,模拟器都能正常工作。
Thus, it is not correct to say that one or the other calculation result is more correct. Within the task of production forecasting it is logical to consider all the options as equally correct. The forecast itself is an estimation.
因此,说一个或另一个计算结果更正确是不正确的。在生产预测任务中,将所有选项均视为正确是合乎逻辑的。预测本身就是一种估计。

Question: What calculation result should I take?
问题:应该取什么计算结果?
In our opinion, all results are equal and correct, you can choose any one you like. As for the choice of one variant of the two equal variants, we would advise to choose calculation on the maximum available number of cores. It is the fastest. Taking into account the shortage of time, this calculation can be considered as the best.
我们认为,所有结果都是平等且正确的,您可以选择任意一个。至于选择两个相等的变体中的一个变体,我们建议选择基于最大可用核数的计算。这是最快的。考虑到时间不足,可以认为此计算是最佳的。

Question: How can I match together the results of tNavigator calculation and another simulator?
问题:如何将tNavigator计算的结果和另一个模拟器进行匹配?
If necessary, the sensitivity of the model to the conditions in SCHEDULE can be reduced by specifying restrictions of the maximum time step length. In tNavigator this can be done via the command:
如有必要,可以通过指定最大时间步长的限制来降低模型对SCHEDULE中条件的敏感度。在tNavigator中,可以通过以下命令完成此操作:
Example
RUNCTRL
DTMAX 1 /
/
示例
RUNCTRL
DTMAX 1 /
/  
where DTMAX – maximal allowed time step (days).
其中DTMAX – 最大允许时间步长(天)。
You should set in TUNING (see 13.20.136) maximum time step – 1 day – to calculate your model by another simulator.
应该在TUNING中设置(请参阅13.20.136)最大时间步长(1天),以便由另一个模拟器计算模型。
For the correctness of comparison run calculations on one core.
为了确保比较的正确性,请在一个核上运行计算。
Most probably the results of calculations will match together. However, in this case calculation time may significantly increase due to increase of the number of steps.
计算结果很可能会匹配在一起。但是,在这种情况下,由于步数的增加,计算时间可能会大大增加。

(注:总结起来,计算结果不一致有两种情况。
一、计算时采用不同内核数。数值解的精度可能会对其有影响,尤其当模型中有复杂的人为设定时。这种情况不仅发生在不同CPU核数时,也发生在GPU计算时,比如不同的GPU性能不一样,计算结果理论上可能有差异。不论哪种计算结果,都是正确的;推荐选择计算效率最高的那个。
二、不同模拟器计算结果有差异。这很正常,通常不同模拟器的数值计算收敛准则不一样;通过调整DTMIN等参数可以尽可能让二者结果近似。

抛开计算结果有差异的情况,模型的收敛性是很值得关注的问题,但是没有编程基础+软件编写经验,很难理解收敛参数的具体含义,也就很难去针对性的调整。若是有此类项目能参与其中,是每个油藏工程师的幸福。--qcy)



"The correct answer" in dynamic modelling
动态模拟中的“正确答案”

In this section we'll identify some of uncertainty factors that influence the dynamic problem solution. The solution "sensitivity" to
在本节中,我们将确定一些影响动态问题解决方案的不确定性因素。对“敏感性” 解决方案
  • maximal time step limit,
  • 最大时间步长限制,
  • linear and non-linear problem convergence tolerance,
  • 线性和非线性问题收敛容限,
  • number of cores used
  • 使用的内核数

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|服务支持:DZ动力|科吉思石油技术咨询有限公司 ( 京ICP备15057753号

GMT+8, 2024-5-1 07:05 , Processed in 0.203125 second(s), 31 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表