mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: put calculation of production gas-water perf rates in separate method
This commit is contained in:
parent
21aa783d88
commit
516320699e
@ -473,6 +473,12 @@ namespace Opm
|
|||||||
const Value& rv,
|
const Value& rv,
|
||||||
const Value& rs,
|
const Value& rs,
|
||||||
const Value& rvw) const;
|
const Value& rvw) const;
|
||||||
|
|
||||||
|
template<class Value>
|
||||||
|
void gasWaterPerfRateProd(std::vector<Value>& cq_s,
|
||||||
|
PerforationRates& perf_rates,
|
||||||
|
const Value& rvw,
|
||||||
|
const Value& rsw) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -234,18 +234,7 @@ namespace Opm
|
|||||||
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) && FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) && FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||||
gasOilPerfRateProd(cq_s, perf_rates, rv, rs, rvw);
|
gasOilPerfRateProd(cq_s, perf_rates, rv, rs, rvw);
|
||||||
} else if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) && FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
} else if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) && FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||||
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
gasWaterPerfRateProd(cq_s, perf_rates, rvw, rsw);
|
||||||
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
|
||||||
const Value cq_sWat = cq_s[waterCompIdx];
|
|
||||||
const Value cq_sGas = cq_s[gasCompIdx];
|
|
||||||
const Value vap_wat = rvw * cq_sGas;
|
|
||||||
const Value dis_gas_wat = rsw * cq_sWat;
|
|
||||||
cq_s[waterCompIdx] += vap_wat;
|
|
||||||
cq_s[gasCompIdx] += dis_gas_wat;
|
|
||||||
if (this->isProducer()) {
|
|
||||||
perf_rates.vap_wat = getValue(vap_wat);
|
|
||||||
perf_rates.dis_gas_in_water = getValue(dis_gas_wat);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Do nothing if crossflow is not allowed
|
// Do nothing if crossflow is not allowed
|
||||||
@ -2482,4 +2471,29 @@ namespace Opm
|
|||||||
perf_rates.vap_wat = getValue(vap_wat);
|
perf_rates.vap_wat = getValue(vap_wat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename TypeTag>
|
||||||
|
template<class Value>
|
||||||
|
void
|
||||||
|
StandardWell<TypeTag>::
|
||||||
|
gasWaterPerfRateProd(std::vector<Value>& cq_s,
|
||||||
|
PerforationRates& perf_rates,
|
||||||
|
const Value& rvw,
|
||||||
|
const Value& rsw) const
|
||||||
|
{
|
||||||
|
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
||||||
|
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
||||||
|
const Value cq_sWat = cq_s[waterCompIdx];
|
||||||
|
const Value cq_sGas = cq_s[gasCompIdx];
|
||||||
|
const Value vap_wat = rvw * cq_sGas;
|
||||||
|
const Value dis_gas_wat = rsw * cq_sWat;
|
||||||
|
cq_s[waterCompIdx] += vap_wat;
|
||||||
|
cq_s[gasCompIdx] += dis_gas_wat;
|
||||||
|
if (this->isProducer()) {
|
||||||
|
perf_rates.vap_wat = getValue(vap_wat);
|
||||||
|
perf_rates.dis_gas_in_water = getValue(dis_gas_wat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user