|
|
|
|
@ -230,8 +230,79 @@ nmWxAutomaticFitting::nmWxAutomaticFitting(QWidget *parent)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取数据
|
|
|
|
|
reservoirData = nmDataAnalyzeManager::getCurrentInstance()->getReservoirDataCopy();
|
|
|
|
|
automaticFittingData = nmDataAnalyzeManager::getCurrentInstance()->getAutomaticFittingDataCopy();
|
|
|
|
|
nmDataAnalyzeManager* pManager = nmDataAnalyzeManager::getCurrentInstance();
|
|
|
|
|
reservoirData = pManager->getReservoirDataCopy();
|
|
|
|
|
automaticFittingData = pManager->getAutomaticFittingDataCopy();
|
|
|
|
|
|
|
|
|
|
NM_SOLVER_MODEL_TYPE solverModelType = pManager->getSolverModelType();
|
|
|
|
|
// 只有尚未点击确定保存过配置时才使用相态默认值;重新打开时保留已保存的数据。
|
|
|
|
|
if(pManager->getAutomaticFittingData() == nullptr) {
|
|
|
|
|
bool isOilOrWaterSinglePhase = solverModelType == SMT_Oil_ConstPvt ||
|
|
|
|
|
solverModelType == SMT_Oil_VariablePvt ||
|
|
|
|
|
solverModelType == SMT_Water_ConstPvt ||
|
|
|
|
|
solverModelType == SMT_Water_VariablePvt;
|
|
|
|
|
if(isOilOrWaterSinglePhase) {
|
|
|
|
|
reservoirData.getPermeability().setValue(2.5e-2);
|
|
|
|
|
automaticFittingData.getPermeabilityMin().setValue(1.0e-3);
|
|
|
|
|
automaticFittingData.getPermeabilityMax().setValue(10.0);
|
|
|
|
|
automaticFittingData.getSkinMin().setValue(-10.0);
|
|
|
|
|
automaticFittingData.getSkinMax().setValue(10.0);
|
|
|
|
|
automaticFittingData.getWellboreStorageMin().setValue(1.0e-4);
|
|
|
|
|
automaticFittingData.getWellboreStorageMax().setValue(2.0);
|
|
|
|
|
automaticFittingData.getPorosityMin().setValue(1.0e-2);
|
|
|
|
|
automaticFittingData.getPorosityMax().setValue(5.0e-1);
|
|
|
|
|
automaticFittingData.getInitialPressureMin().setValue(0.1);
|
|
|
|
|
automaticFittingData.getInitialPressureMax().setValue(50.0);
|
|
|
|
|
automaticFittingData.getThicknessMin().setValue(2.0);
|
|
|
|
|
automaticFittingData.getThicknessMax().setValue(50.0);
|
|
|
|
|
automaticFittingData.getCtMin().setValue(1.0e-3);
|
|
|
|
|
automaticFittingData.getCtMax().setValue(1.0e-1);
|
|
|
|
|
automaticFittingData.getCfMin().setValue(1.0e-5);
|
|
|
|
|
automaticFittingData.getCfMax().setValue(1.0e-2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 气单相变化 PVT 使用 T5 数据集对应的初始值和拟合范围。
|
|
|
|
|
if(solverModelType == SMT_Gas_VariablePvt) {
|
|
|
|
|
reservoirData.getPermeability().setValue(5.5e-6);
|
|
|
|
|
reservoirData.getPorosity().setValue(3.5e-2);
|
|
|
|
|
reservoirData.getThickness().setValue(8.0);
|
|
|
|
|
reservoirData.getCf().setValue(3.0e-4);
|
|
|
|
|
|
|
|
|
|
automaticFittingData.getPermeabilityMin().setValue(4.5e-6);
|
|
|
|
|
automaticFittingData.getPermeabilityMax().setValue(6.2e-6);
|
|
|
|
|
automaticFittingData.getSkinMin().setValue(0.0);
|
|
|
|
|
automaticFittingData.getSkinMax().setValue(4.5);
|
|
|
|
|
automaticFittingData.getWellboreStorageMin().setValue(5.0e-5);
|
|
|
|
|
automaticFittingData.getWellboreStorageMax().setValue(1.6e-4);
|
|
|
|
|
automaticFittingData.getPorosityMin().setValue(8.0e-3);
|
|
|
|
|
automaticFittingData.getPorosityMax().setValue(4.0e-2);
|
|
|
|
|
automaticFittingData.getThicknessMin().setValue(7.0);
|
|
|
|
|
automaticFittingData.getThicknessMax().setValue(11.0);
|
|
|
|
|
automaticFittingData.getCfMin().setValue(1.0e-4);
|
|
|
|
|
automaticFittingData.getCfMax().setValue(2.0e-3);
|
|
|
|
|
} else if(solverModelType == SMT_Oil_ConstPvt ||
|
|
|
|
|
solverModelType == SMT_Water_ConstPvt) {
|
|
|
|
|
// T1/T3 使用固定初值,不继承当前储层参数。
|
|
|
|
|
reservoirData.getPorosity().setValue(2.45e-2);
|
|
|
|
|
reservoirData.getInitialPressure().setValue(34.47);
|
|
|
|
|
reservoirData.getThickness().setValue(9.144);
|
|
|
|
|
reservoirData.getCt().setValue(1.0e-2);
|
|
|
|
|
} else if(solverModelType == SMT_Oil_VariablePvt) {
|
|
|
|
|
// 油单相变化 PVT 使用固定初值。
|
|
|
|
|
reservoirData.getPorosity().setValue(6.0e-2);
|
|
|
|
|
reservoirData.getThickness().setValue(10.5);
|
|
|
|
|
reservoirData.getCf().setValue(1.0e-3);
|
|
|
|
|
reservoirData.getInitialPressure().setValue(34.47);
|
|
|
|
|
automaticFittingData.setInitialPressureSelected(false);
|
|
|
|
|
} else if(solverModelType == SMT_Water_VariablePvt) {
|
|
|
|
|
// 水单相变化 PVT 使用固定初值。
|
|
|
|
|
reservoirData.getPorosity().setValue(6.0e-2);
|
|
|
|
|
reservoirData.getThickness().setValue(10.5);
|
|
|
|
|
reservoirData.getCf().setValue(1.5e-3);
|
|
|
|
|
reservoirData.getInitialPressure().setValue(34.47);
|
|
|
|
|
automaticFittingData.setInitialPressureSelected(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setupUI();
|
|
|
|
|
setWindowTitle(tr("Automatic fitting"));
|
|
|
|
|
@ -816,6 +887,28 @@ void nmWxAutomaticFitting::onWellSelected(int index)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 尚未保存拟合配置时使用相态默认值;已保存时保留井上的 Skin 和井筒储集系数。
|
|
|
|
|
nmDataAnalyzeManager* pManager = nmDataAnalyzeManager::getCurrentInstance();
|
|
|
|
|
bool useDefaultFittingValues = pManager && pManager->getAutomaticFittingData() == nullptr;
|
|
|
|
|
if(useDefaultFittingValues && (pManager->getSolverModelType() == SMT_Oil_ConstPvt ||
|
|
|
|
|
pManager->getSolverModelType() == SMT_Water_ConstPvt)) {
|
|
|
|
|
skinValue = 0.0;
|
|
|
|
|
wellboreStorageValue = 1.0e-2;
|
|
|
|
|
found = true;
|
|
|
|
|
} else if(useDefaultFittingValues && pManager->getSolverModelType() == SMT_Gas_VariablePvt) {
|
|
|
|
|
skinValue = 1.0;
|
|
|
|
|
wellboreStorageValue = 6.0e-5;
|
|
|
|
|
found = true;
|
|
|
|
|
} else if(useDefaultFittingValues && pManager->getSolverModelType() == SMT_Oil_VariablePvt) {
|
|
|
|
|
skinValue = -0.2;
|
|
|
|
|
wellboreStorageValue = 1.5e-2;
|
|
|
|
|
found = true;
|
|
|
|
|
} else if(useDefaultFittingValues && pManager->getSolverModelType() == SMT_Water_VariablePvt) {
|
|
|
|
|
skinValue = -0.2;
|
|
|
|
|
wellboreStorageValue = 1.0e-2;
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (found) {
|
|
|
|
|
// 更新表格数据
|
|
|
|
|
// 确保表格项存在
|
|
|
|
|
|