refactor: fillPvtInputByModel压力横坐标读取移入各分支,ConstPvt不依赖pPvt

1. 移除顶部公共压力读取,各VariablePvt分支内部自行读取pPvt->getPressure()
2. ConstPvt分支完全不碰pPvt参数,职责更清晰
feature/UI-20260528^2
lh 2 days ago
parent a94bc0ac70
commit aa1c498180

@ -108,14 +108,9 @@ void fillPvtInputByModel(HX_NWTM_MODEL_INPUT& input,
nmDataPvtParaForPebi* pPvt, nmDataPvtParaForPebi* pPvt,
nmDataReservoir* pRes) nmDataReservoir* pRes)
{ {
// 压力横坐标变化PVT从曲线读取常数PVT生成占位数组
if(pPvt != nullptr) {
assignPvtVectorIfNotEmpty(input.PVT.p, pPvt->getPressure());
}
switch(eModelType) { switch(eModelType) {
case SMT_Oil_ConstPvt: case SMT_Oil_ConstPvt:
// 油相常数PVT生成占位压力数组 + 单值扩展为200元素数组 // 油相常数PVT不依赖pPvt生成占位压力数组 + 单值扩展为200元素数组
input.PVT.p = generateDummyPressure(); input.PVT.p = generateDummyPressure();
if(pRes != nullptr) { if(pRes != nullptr) {
input.PVT.Bo = expandConstPvt(pRes->getBo().getValue().toDouble()); input.PVT.Bo = expandConstPvt(pRes->getBo().getValue().toDouble());
@ -126,6 +121,7 @@ void fillPvtInputByModel(HX_NWTM_MODEL_INPUT& input,
case SMT_Oil_VariablePvt: case SMT_Oil_VariablePvt:
// 油相变化PVT从 pebiPvtPara 读曲线数组 // 油相变化PVT从 pebiPvtPara 读曲线数组
if(pPvt != nullptr) { if(pPvt != nullptr) {
assignPvtVectorIfNotEmpty(input.PVT.p, pPvt->getPressure());
assignPvtVectorIfNotEmpty(input.PVT.Bo, pPvt->getBo()); assignPvtVectorIfNotEmpty(input.PVT.Bo, pPvt->getBo());
assignPvtVectorIfNotEmpty(input.PVT.Co, pPvt->getCo()); assignPvtVectorIfNotEmpty(input.PVT.Co, pPvt->getCo());
assignPvtVectorIfNotEmpty(input.PVT.miuo, pPvt->getMiuo()); assignPvtVectorIfNotEmpty(input.PVT.miuo, pPvt->getMiuo());
@ -133,7 +129,7 @@ void fillPvtInputByModel(HX_NWTM_MODEL_INPUT& input,
break; break;
case SMT_Water_ConstPvt: case SMT_Water_ConstPvt:
// 水相常数PVT生成占位压力数组 + 单值扩展为200元素数组 // 水相常数PVT不依赖pPvt生成占位压力数组 + 单值扩展为200元素数组
input.PVT.p = generateDummyPressure(); input.PVT.p = generateDummyPressure();
if(pRes != nullptr) { if(pRes != nullptr) {
input.PVT.Bw = expandConstPvt(pRes->getBw().getValue().toDouble()); input.PVT.Bw = expandConstPvt(pRes->getBw().getValue().toDouble());
@ -144,6 +140,7 @@ void fillPvtInputByModel(HX_NWTM_MODEL_INPUT& input,
case SMT_Water_VariablePvt: case SMT_Water_VariablePvt:
// 水相变化PVT从 pebiPvtPara 读曲线数组 // 水相变化PVT从 pebiPvtPara 读曲线数组
if(pPvt != nullptr) { if(pPvt != nullptr) {
assignPvtVectorIfNotEmpty(input.PVT.p, pPvt->getPressure());
assignPvtVectorIfNotEmpty(input.PVT.Bw, pPvt->getBw()); assignPvtVectorIfNotEmpty(input.PVT.Bw, pPvt->getBw());
assignPvtVectorIfNotEmpty(input.PVT.Cw, pPvt->getCw()); assignPvtVectorIfNotEmpty(input.PVT.Cw, pPvt->getCw());
assignPvtVectorIfNotEmpty(input.PVT.miuw, pPvt->getMiuw()); assignPvtVectorIfNotEmpty(input.PVT.miuw, pPvt->getMiuw());
@ -154,6 +151,7 @@ void fillPvtInputByModel(HX_NWTM_MODEL_INPUT& input,
case SMT_Gas_PseudoPressure: case SMT_Gas_PseudoPressure:
// 气相变化PVT/拟压力:从 pebiPvtPara 读曲线数组 // 气相变化PVT/拟压力:从 pebiPvtPara 读曲线数组
if(pPvt != nullptr) { if(pPvt != nullptr) {
assignPvtVectorIfNotEmpty(input.PVT.p, pPvt->getPressure());
assignPvtVectorIfNotEmpty(input.PVT.Bg, pPvt->getBg()); assignPvtVectorIfNotEmpty(input.PVT.Bg, pPvt->getBg());
assignPvtVectorIfNotEmpty(input.PVT.Cg, pPvt->getCg()); assignPvtVectorIfNotEmpty(input.PVT.Cg, pPvt->getCg());
assignPvtVectorIfNotEmpty(input.PVT.miug, pPvt->getMiug()); assignPvtVectorIfNotEmpty(input.PVT.miug, pPvt->getMiug());
@ -163,6 +161,7 @@ void fillPvtInputByModel(HX_NWTM_MODEL_INPUT& input,
case SMT_Oil_Water_TwoPhase: case SMT_Oil_Water_TwoPhase:
// 油水两相:从 pebiPvtPara 读油+水曲线数组 + 相渗数据 // 油水两相:从 pebiPvtPara 读油+水曲线数组 + 相渗数据
if(pPvt != nullptr) { if(pPvt != nullptr) {
assignPvtVectorIfNotEmpty(input.PVT.p, pPvt->getPressure());
assignPvtVectorIfNotEmpty(input.PVT.Bo, pPvt->getBo()); assignPvtVectorIfNotEmpty(input.PVT.Bo, pPvt->getBo());
assignPvtVectorIfNotEmpty(input.PVT.miuo, pPvt->getMiuo()); assignPvtVectorIfNotEmpty(input.PVT.miuo, pPvt->getMiuo());
assignPvtVectorIfNotEmpty(input.PVT.Bw, pPvt->getBw()); assignPvtVectorIfNotEmpty(input.PVT.Bw, pPvt->getBw());

Loading…
Cancel
Save