|
|
|
|
@ -42,6 +42,7 @@
|
|
|
|
|
#include "ZxDataGaugeBase.h"
|
|
|
|
|
#include "ZxDataGaugeP.h"
|
|
|
|
|
#include "ZxDataGaugeF.h"
|
|
|
|
|
#include "ZxBaHelper.h"
|
|
|
|
|
#include "zxSysUtils.h"
|
|
|
|
|
#include "ZxDataProject.h"
|
|
|
|
|
|
|
|
|
|
@ -152,72 +153,226 @@ static NM_WELL_CATEGORY frameworkWellCategory(const ZxDataWell* pWellData)
|
|
|
|
|
? eWellCategory : NM_WellCategory_Unknown;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从一条测量数据中复制二维点。流量调用方必须显式传入油、气、水井别索引。
|
|
|
|
|
static bool readGaugePoints(ZxDataGaugeBase* pGaugeData,
|
|
|
|
|
int nObjectIndex,
|
|
|
|
|
QVector<QPointF>& vecPoints)
|
|
|
|
|
// DLL 的带索引 getter 实际始终返回主块,压力和多相流量都必须直接解析指定字节块。
|
|
|
|
|
// 空块不算数据损坏,只有解析失败或 X/Y 长度不一致才算损坏。
|
|
|
|
|
static bool readFlowGaugeBlock(
|
|
|
|
|
const QByteArray& baGaugeData,
|
|
|
|
|
QVector<QPointF>& vecPoints)
|
|
|
|
|
{
|
|
|
|
|
vecPoints.clear();
|
|
|
|
|
if(pGaugeData == nullptr) {
|
|
|
|
|
return false;
|
|
|
|
|
if(baGaugeData.isEmpty()) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QByteArray baData = baGaugeData;
|
|
|
|
|
VecDouble vecX;
|
|
|
|
|
VecDouble vecY;
|
|
|
|
|
if(!pGaugeData->getDataVecXY(vecX, vecY, nObjectIndex)) {
|
|
|
|
|
if(!ZxBaHelper::convertBa2VecXY(vecX, vecY, baData) ||
|
|
|
|
|
vecX.size() != vecY.size()) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const int nPointCount = qMin(
|
|
|
|
|
static_cast<int>(vecX.size()),
|
|
|
|
|
static_cast<int>(vecY.size()));
|
|
|
|
|
vecPoints.reserve(nPointCount);
|
|
|
|
|
for(int nIndex = 0; nIndex < nPointCount; ++nIndex) {
|
|
|
|
|
vecPoints.reserve(static_cast<int>(vecX.size()));
|
|
|
|
|
for(int nIndex = 0; nIndex < static_cast<int>(vecX.size()); ++nIndex) {
|
|
|
|
|
vecPoints.append(QPointF(vecX[nIndex], vecY[nIndex]));
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 读取工程井的第一条压力和流量数据;井别是流量相别的唯一事实来源。
|
|
|
|
|
static bool readFrameworkWellCurves(
|
|
|
|
|
// 解析单个字节块并据此判定该块自身的可用状态:空块为 Empty,解析失败为 Corrupt。
|
|
|
|
|
static NM_GAUGE_RECORD_STATUS readBlockAndClassify(
|
|
|
|
|
const QByteArray& baGaugeData,
|
|
|
|
|
QVector<QPointF>& vecPoints)
|
|
|
|
|
{
|
|
|
|
|
if(baGaugeData.isEmpty()) {
|
|
|
|
|
vecPoints.clear();
|
|
|
|
|
return NM_GaugeRecord_Empty;
|
|
|
|
|
}
|
|
|
|
|
return readFlowGaugeBlock(baGaugeData, vecPoints)
|
|
|
|
|
? NM_GaugeRecord_Usable : NM_GaugeRecord_Corrupt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 多相流量记录:主块=油、Ex2=气、Ex3=水;任一非空块损坏则整条记录损坏,三块全空才是空记录。
|
|
|
|
|
static NM_GAUGE_RECORD_STATUS classifyMultiPhaseFlowRecord(
|
|
|
|
|
ZxDataGaugeF* pGaugeF,
|
|
|
|
|
QVector<QPointF>& vecOilPoints,
|
|
|
|
|
QVector<QPointF>& vecGasPoints,
|
|
|
|
|
QVector<QPointF>& vecWaterPoints)
|
|
|
|
|
{
|
|
|
|
|
const QByteArray baOil = pGaugeF->getGaugeData();
|
|
|
|
|
const QByteArray baGas = pGaugeF->getGaugeDataEx2();
|
|
|
|
|
const QByteArray baWater = pGaugeF->getGaugeDataEx3();
|
|
|
|
|
|
|
|
|
|
const bool bOilOk = readFlowGaugeBlock(baOil, vecOilPoints);
|
|
|
|
|
const bool bGasOk = readFlowGaugeBlock(baGas, vecGasPoints);
|
|
|
|
|
const bool bWaterOk = readFlowGaugeBlock(baWater, vecWaterPoints);
|
|
|
|
|
if(!bOilOk || !bGasOk || !bWaterOk) {
|
|
|
|
|
return NM_GaugeRecord_Corrupt;
|
|
|
|
|
}
|
|
|
|
|
if(baOil.isEmpty() && baGas.isEmpty() && baWater.isEmpty()) {
|
|
|
|
|
return NM_GaugeRecord_Empty;
|
|
|
|
|
}
|
|
|
|
|
return NM_GaugeRecord_Usable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 单相流量记录:只解析主块,并按井别把数据归入油、气或水相;忽略可能残留的 Ex2/Ex3。
|
|
|
|
|
static NM_GAUGE_RECORD_STATUS classifySinglePhaseFlowRecord(
|
|
|
|
|
ZxDataGaugeF* pGaugeF,
|
|
|
|
|
NM_WELL_CATEGORY eWellCategory,
|
|
|
|
|
QVector<QPointF>& vecOilPoints,
|
|
|
|
|
QVector<QPointF>& vecGasPoints,
|
|
|
|
|
QVector<QPointF>& vecWaterPoints)
|
|
|
|
|
{
|
|
|
|
|
switch(eWellCategory) {
|
|
|
|
|
case NM_WellCategory_Oil:
|
|
|
|
|
return readBlockAndClassify(pGaugeF->getGaugeData(), vecOilPoints);
|
|
|
|
|
case NM_WellCategory_Gas:
|
|
|
|
|
return readBlockAndClassify(pGaugeF->getGaugeData(), vecGasPoints);
|
|
|
|
|
case NM_WellCategory_Water:
|
|
|
|
|
return readBlockAndClassify(pGaugeF->getGaugeData(), vecWaterPoints);
|
|
|
|
|
default:
|
|
|
|
|
// 调用方在枚举记录前已校验过井别有效性,这里不应该被触达。
|
|
|
|
|
return NM_GaugeRecord_Corrupt;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool nmDataAnalyzeManager::readFrameworkWellCurves(
|
|
|
|
|
ZxDataWell* pWellData,
|
|
|
|
|
QVector<QPointF>& vecPressurePoints,
|
|
|
|
|
QVector<QPointF>& vecFlowPoints,
|
|
|
|
|
QVector<nmPressureGaugeRecord>& vecPressureRecords,
|
|
|
|
|
QVector<nmFlowGaugeRecord>& vecFlowRecords,
|
|
|
|
|
NM_WELL_CATEGORY& eWellCategory)
|
|
|
|
|
{
|
|
|
|
|
vecPressurePoints.clear();
|
|
|
|
|
vecFlowPoints.clear();
|
|
|
|
|
vecPressureRecords.clear();
|
|
|
|
|
vecFlowRecords.clear();
|
|
|
|
|
eWellCategory = frameworkWellCategory(pWellData);
|
|
|
|
|
if(pWellData == nullptr || !nmIsValidWellCategory(eWellCategory)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ZxDataGaugeP* pGaugeP = nullptr;
|
|
|
|
|
// 第一步:枚举全部压力记录,不再只取第一条。
|
|
|
|
|
const ZxDataObjectList listGaugeP =
|
|
|
|
|
pWellData->getChildren(iDataModelType::sTypeDataGaugeP);
|
|
|
|
|
QSet<QString> setSeenPressureCodes;
|
|
|
|
|
for(int nIndex = 0; nIndex < listGaugeP.size(); ++nIndex) {
|
|
|
|
|
pGaugeP = dynamic_cast<ZxDataGaugeP*>(listGaugeP[nIndex]);
|
|
|
|
|
if(pGaugeP != nullptr) {
|
|
|
|
|
break;
|
|
|
|
|
ZxDataGaugeP* pGaugeP = dynamic_cast<ZxDataGaugeP*>(listGaugeP[nIndex]);
|
|
|
|
|
if(pGaugeP == nullptr) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nmPressureGaugeRecord oRecord;
|
|
|
|
|
oRecord.sGaugeCode = pGaugeP->getCode();
|
|
|
|
|
oRecord.sGaugeName = pGaugeP->getGaugeName();
|
|
|
|
|
oRecord.sGaugeTime = pGaugeP->getGaugeTime();
|
|
|
|
|
oRecord.eStatus = readBlockAndClassify(
|
|
|
|
|
pGaugeP->getGaugeData(), oRecord.vecPressurePoints);
|
|
|
|
|
|
|
|
|
|
// 空 Code 或同井重复 Code 属于身份问题,覆盖内容判定结果。
|
|
|
|
|
if(oRecord.sGaugeCode.isEmpty() ||
|
|
|
|
|
setSeenPressureCodes.contains(oRecord.sGaugeCode)) {
|
|
|
|
|
oRecord.eStatus = NM_GaugeRecord_InvalidIdentity;
|
|
|
|
|
} else {
|
|
|
|
|
setSeenPressureCodes.insert(oRecord.sGaugeCode);
|
|
|
|
|
}
|
|
|
|
|
vecPressureRecords.append(oRecord);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ZxDataGaugeF* pGaugeF = nullptr;
|
|
|
|
|
// 第二步:枚举全部流量记录,不再只取第一条。
|
|
|
|
|
const ZxDataObjectList listGaugeF =
|
|
|
|
|
pWellData->getChildren(iDataModelType::sTypeDataGaugeF);
|
|
|
|
|
QSet<QString> setSeenFlowCodes;
|
|
|
|
|
for(int nIndex = 0; nIndex < listGaugeF.size(); ++nIndex) {
|
|
|
|
|
pGaugeF = dynamic_cast<ZxDataGaugeF*>(listGaugeF[nIndex]);
|
|
|
|
|
if(pGaugeF != nullptr) {
|
|
|
|
|
break;
|
|
|
|
|
ZxDataGaugeF* pGaugeF = dynamic_cast<ZxDataGaugeF*>(listGaugeF[nIndex]);
|
|
|
|
|
if(pGaugeF == nullptr) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nmFlowGaugeRecord oRecord;
|
|
|
|
|
oRecord.sGaugeCode = pGaugeF->getCode();
|
|
|
|
|
oRecord.sGaugeName = pGaugeF->getGaugeName();
|
|
|
|
|
oRecord.sGaugeTime = pGaugeF->getGaugeTime();
|
|
|
|
|
oRecord.bMultiPhase = pGaugeF->getMultiPhase();
|
|
|
|
|
oRecord.eStatus = oRecord.bMultiPhase
|
|
|
|
|
? classifyMultiPhaseFlowRecord(
|
|
|
|
|
pGaugeF, oRecord.vecOilPoints,
|
|
|
|
|
oRecord.vecGasPoints, oRecord.vecWaterPoints)
|
|
|
|
|
: classifySinglePhaseFlowRecord(
|
|
|
|
|
pGaugeF, eWellCategory,
|
|
|
|
|
oRecord.vecOilPoints,
|
|
|
|
|
oRecord.vecGasPoints, oRecord.vecWaterPoints);
|
|
|
|
|
|
|
|
|
|
// 空 Code 或同井重复 Code 属于身份问题,覆盖内容判定结果。
|
|
|
|
|
if(oRecord.sGaugeCode.isEmpty() ||
|
|
|
|
|
setSeenFlowCodes.contains(oRecord.sGaugeCode)) {
|
|
|
|
|
oRecord.eStatus = NM_GaugeRecord_InvalidIdentity;
|
|
|
|
|
} else {
|
|
|
|
|
setSeenFlowCodes.insert(oRecord.sGaugeCode);
|
|
|
|
|
}
|
|
|
|
|
vecFlowRecords.append(oRecord);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 压力数据仍读取二维主对象;流量必须使用井别对应的 0/1/2 大字段索引。
|
|
|
|
|
readGaugePoints(pGaugeP, 0, vecPressurePoints);
|
|
|
|
|
readGaugePoints(pGaugeF, static_cast<int>(eWellCategory), vecFlowPoints);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 判断某相流量点是否至少包含一个真实流动段,去除可选首个 (0,0) 占位点后非空即为真实。
|
|
|
|
|
static bool hasRealFlowSegment(const QVector<QPointF>& vecPoints)
|
|
|
|
|
{
|
|
|
|
|
if(vecPoints.isEmpty()) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if(vecPoints.size() == 1 &&
|
|
|
|
|
vecPoints.first().x() == 0.0 && vecPoints.first().y() == 0.0) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从压力记录列表中选出框架顺序中第一条 Usable 记录;找不到则返回空 Code。
|
|
|
|
|
static QString selectDefaultPressureGaugeCode(
|
|
|
|
|
const QVector<nmPressureGaugeRecord>& vecRecords)
|
|
|
|
|
{
|
|
|
|
|
foreach(const nmPressureGaugeRecord& oRecord, vecRecords) {
|
|
|
|
|
if(oRecord.eStatus == NM_GaugeRecord_Usable) {
|
|
|
|
|
return oRecord.sGaugeCode;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return QString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从流量记录列表中选出框架顺序中第一条至少含一个真实相的记录;找不到则返回空 Code。
|
|
|
|
|
static QString selectDefaultFlowGaugeCode(
|
|
|
|
|
const QVector<nmFlowGaugeRecord>& vecRecords)
|
|
|
|
|
{
|
|
|
|
|
foreach(const nmFlowGaugeRecord& oRecord, vecRecords) {
|
|
|
|
|
if(oRecord.eStatus != NM_GaugeRecord_Usable) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if(hasRealFlowSegment(oRecord.vecOilPoints) ||
|
|
|
|
|
hasRealFlowSegment(oRecord.vecGasPoints) ||
|
|
|
|
|
hasRealFlowSegment(oRecord.vecWaterPoints)) {
|
|
|
|
|
return oRecord.sGaugeCode;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return QString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 把枚举到的记录列表写入数值井,并按默认规则选中压力/流量记录。
|
|
|
|
|
// 找不到任何可用记录时仍会写入(可能为空的)列表,只是选中 Code 为空——不阻止建井。
|
|
|
|
|
void nmDataAnalyzeManager::applyGaugeRecordsToWell(
|
|
|
|
|
nmDataWellBase* pWellData,
|
|
|
|
|
const QVector<nmPressureGaugeRecord>& vecPressureRecords,
|
|
|
|
|
const QVector<nmFlowGaugeRecord>& vecFlowRecords)
|
|
|
|
|
{
|
|
|
|
|
if(pWellData == nullptr) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
pWellData->setPressureRecords(vecPressureRecords);
|
|
|
|
|
pWellData->setFlowRecords(vecFlowRecords);
|
|
|
|
|
pWellData->selectPressureGaugeCode(
|
|
|
|
|
selectDefaultPressureGaugeCode(vecPressureRecords));
|
|
|
|
|
pWellData->selectFlowGaugeCode(
|
|
|
|
|
selectDefaultFlowGaugeCode(vecFlowRecords));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool isWellParaAttrName(const QString& name)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < WELL_PARA_DESC_COUNT; ++i) {
|
|
|
|
|
@ -1447,11 +1602,11 @@ void nmDataAnalyzeManager::initCurWellData()
|
|
|
|
|
// 判断是哪一种井类型,初始化对应的参数
|
|
|
|
|
QString wellClass = pWellData->getWellClassEn();
|
|
|
|
|
|
|
|
|
|
QVector<QPointF> vecPtsP;
|
|
|
|
|
QVector<QPointF> vecPtsF;
|
|
|
|
|
QVector<nmPressureGaugeRecord> vecPressureRecords;
|
|
|
|
|
QVector<nmFlowGaugeRecord> vecFlowRecords;
|
|
|
|
|
NM_WELL_CATEGORY eWellCategory = NM_WellCategory_Unknown;
|
|
|
|
|
if(!readFrameworkWellCurves(pWellData, vecPtsP, vecPtsF,
|
|
|
|
|
eWellCategory)) {
|
|
|
|
|
if(!readFrameworkWellCurves(pWellData, vecPressureRecords,
|
|
|
|
|
vecFlowRecords, eWellCategory)) {
|
|
|
|
|
qWarning() << "Cannot import numerical well with invalid category:"
|
|
|
|
|
<< pWellData->getCode();
|
|
|
|
|
return;
|
|
|
|
|
@ -1478,9 +1633,8 @@ void nmDataAnalyzeManager::initCurWellData()
|
|
|
|
|
tempAttr.setValue(pWellData->getWellRadius());
|
|
|
|
|
pVerticalWell->setRadius(tempAttr);
|
|
|
|
|
|
|
|
|
|
// 设置井的压力数据、流量数据
|
|
|
|
|
pVerticalWell->setPressurePoints(vecPtsP);
|
|
|
|
|
pVerticalWell->setFlowPoints(vecPtsF);
|
|
|
|
|
// 设置井的压力、流量记录列表,并按默认规则选中当前记录
|
|
|
|
|
applyGaugeRecordsToWell(pVerticalWell, vecPressureRecords, vecFlowRecords);
|
|
|
|
|
|
|
|
|
|
QVector<QVector<double>> vvecHistoryPressureData; //压力历史数据
|
|
|
|
|
QVector<QVector<double>> vvecHistoryLogData; // 历史双对数曲线数据
|
|
|
|
|
@ -1517,9 +1671,8 @@ void nmDataAnalyzeManager::initCurWellData()
|
|
|
|
|
tempAttr.setValue(pWellData->getWellRadius());
|
|
|
|
|
pVFracturedWell->setRadius(tempAttr);
|
|
|
|
|
|
|
|
|
|
// 设置井的压力数据、流量数据
|
|
|
|
|
pVFracturedWell->setPressurePoints(vecPtsP);
|
|
|
|
|
pVFracturedWell->setFlowPoints(vecPtsF);
|
|
|
|
|
// 设置井的压力、流量记录列表,并按默认规则选中当前记录
|
|
|
|
|
applyGaugeRecordsToWell(pVFracturedWell, vecPressureRecords, vecFlowRecords);
|
|
|
|
|
|
|
|
|
|
QVector<QVector<double>> vvecHistoryPressureData; //压力历史数据
|
|
|
|
|
QVector<QVector<double>> vvecHistoryLogData; // 历史双对数曲线数据
|
|
|
|
|
@ -1559,9 +1712,8 @@ void nmDataAnalyzeManager::initCurWellData()
|
|
|
|
|
tempAttr.setValue(pWellData->getWellRadius());
|
|
|
|
|
pHFracturedWell->setRadius(tempAttr);
|
|
|
|
|
|
|
|
|
|
// 设置井的压力数据、流量数据
|
|
|
|
|
pHFracturedWell->setPressurePoints(vecPtsP);
|
|
|
|
|
pHFracturedWell->setFlowPoints(vecPtsF);
|
|
|
|
|
// 设置井的压力、流量记录列表,并按默认规则选中当前记录
|
|
|
|
|
applyGaugeRecordsToWell(pHFracturedWell, vecPressureRecords, vecFlowRecords);
|
|
|
|
|
|
|
|
|
|
QVector<QVector<double>> vvecHistoryPressureData; //压力历史数据
|
|
|
|
|
QVector<QVector<double>> vvecHistoryLogData; // 历史双对数曲线数据
|
|
|
|
|
@ -1703,13 +1855,13 @@ nmDataWellBase* nmDataAnalyzeManager::appendWellData(ZxDataWell* pWellData)
|
|
|
|
|
return pExistingWell;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 井别决定流量大字段;压力仍读取第一条压力数据的主对象。
|
|
|
|
|
// 压力及流量记录统一由工程井读取入口解析。
|
|
|
|
|
const QString sWellClass = pWellData->getWellClassEn();
|
|
|
|
|
QVector<QPointF> vecPtsP;
|
|
|
|
|
QVector<QPointF> vecPtsF;
|
|
|
|
|
QVector<nmPressureGaugeRecord> vecPressureRecords;
|
|
|
|
|
QVector<nmFlowGaugeRecord> vecFlowRecords;
|
|
|
|
|
NM_WELL_CATEGORY eWellCategory = NM_WellCategory_Unknown;
|
|
|
|
|
if(!readFrameworkWellCurves(pWellData, vecPtsP, vecPtsF,
|
|
|
|
|
eWellCategory)) {
|
|
|
|
|
if(!readFrameworkWellCurves(pWellData, vecPressureRecords,
|
|
|
|
|
vecFlowRecords, eWellCategory)) {
|
|
|
|
|
qWarning() << "Cannot append numerical well with invalid category:"
|
|
|
|
|
<< pWellData->getCode();
|
|
|
|
|
return nullptr;
|
|
|
|
|
@ -1738,9 +1890,8 @@ nmDataWellBase* nmDataAnalyzeManager::appendWellData(ZxDataWell* pWellData)
|
|
|
|
|
tempAttr.setValue(pWellData->getWellRadius());
|
|
|
|
|
pVerticalWell->setRadius(tempAttr);
|
|
|
|
|
|
|
|
|
|
// 设置井的压力数据、流量数据
|
|
|
|
|
pVerticalWell->setPressurePoints(vecPtsP);
|
|
|
|
|
pVerticalWell->setFlowPoints(vecPtsF);
|
|
|
|
|
// 设置井的压力、流量记录列表,并按默认规则选中当前记录
|
|
|
|
|
applyGaugeRecordsToWell(pVerticalWell, vecPressureRecords, vecFlowRecords);
|
|
|
|
|
|
|
|
|
|
// 其他井默认选择最后一个真实流动段,索引保持一基。
|
|
|
|
|
pVerticalWell->setIndexF(pVerticalWell->getFlowSegmentCount());
|
|
|
|
|
@ -1767,9 +1918,8 @@ nmDataWellBase* nmDataAnalyzeManager::appendWellData(ZxDataWell* pWellData)
|
|
|
|
|
tempAttr.setValue(pWellData->getWellRadius());
|
|
|
|
|
pVFracturedWell->setRadius(tempAttr);
|
|
|
|
|
|
|
|
|
|
// 设置井的压力数据、流量数据
|
|
|
|
|
pVFracturedWell->setPressurePoints(vecPtsP);
|
|
|
|
|
pVFracturedWell->setFlowPoints(vecPtsF);
|
|
|
|
|
// 设置井的压力、流量记录列表,并按默认规则选中当前记录
|
|
|
|
|
applyGaugeRecordsToWell(pVFracturedWell, vecPressureRecords, vecFlowRecords);
|
|
|
|
|
|
|
|
|
|
// 更新裂缝位置信息
|
|
|
|
|
pVFracturedWell->setFracs();
|
|
|
|
|
@ -1798,9 +1948,8 @@ nmDataWellBase* nmDataAnalyzeManager::appendWellData(ZxDataWell* pWellData)
|
|
|
|
|
tempAttr.setValue(pWellData->getWellRadius());
|
|
|
|
|
pHFracturedWell->setRadius(tempAttr);
|
|
|
|
|
|
|
|
|
|
// 设置井的压力数据、流量数据
|
|
|
|
|
pHFracturedWell->setPressurePoints(vecPtsP);
|
|
|
|
|
pHFracturedWell->setFlowPoints(vecPtsF);
|
|
|
|
|
// 设置井的压力、流量记录列表,并按默认规则选中当前记录
|
|
|
|
|
applyGaugeRecordsToWell(pHFracturedWell, vecPressureRecords, vecFlowRecords);
|
|
|
|
|
|
|
|
|
|
// 计算裂缝数据
|
|
|
|
|
pHFracturedWell->setFracs();
|
|
|
|
|
@ -6151,12 +6300,12 @@ bool nmDataAnalyzeManager::loadWellPreAndFlow()
|
|
|
|
|
|
|
|
|
|
ZxDataWell* pFrameworkWell =
|
|
|
|
|
mapFrameworkWells.value(pWell->getWellCode(), nullptr);
|
|
|
|
|
QVector<QPointF> vecPressurePoints;
|
|
|
|
|
QVector<QPointF> vecFlowPoints;
|
|
|
|
|
QVector<nmPressureGaugeRecord> vecPressureRecords;
|
|
|
|
|
QVector<nmFlowGaugeRecord> vecFlowRecords;
|
|
|
|
|
NM_WELL_CATEGORY eFrameworkCategory = NM_WellCategory_Unknown;
|
|
|
|
|
if(!readFrameworkWellCurves(pFrameworkWell,
|
|
|
|
|
vecPressurePoints,
|
|
|
|
|
vecFlowPoints,
|
|
|
|
|
vecPressureRecords,
|
|
|
|
|
vecFlowRecords,
|
|
|
|
|
eFrameworkCategory) ||
|
|
|
|
|
pWell->getWellCategory() != eFrameworkCategory) {
|
|
|
|
|
qWarning() << "Numerical well category does not match framework well:"
|
|
|
|
|
@ -6164,8 +6313,7 @@ bool nmDataAnalyzeManager::loadWellPreAndFlow()
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pWell->setPressurePoints(vecPressurePoints);
|
|
|
|
|
pWell->setFlowPoints(vecFlowPoints);
|
|
|
|
|
applyGaugeRecordsToWell(pWell, vecPressureRecords, vecFlowRecords);
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|