mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: put calculation of production gas-oil perf rates in separate method
This commit is contained in:
@@ -466,6 +466,13 @@ namespace Opm
|
|||||||
const double dis_gas_rate,
|
const double dis_gas_rate,
|
||||||
const std::vector<EvalWell>& cq_s,
|
const std::vector<EvalWell>& cq_s,
|
||||||
const IntensiveQuantities& intQuants) const;
|
const IntensiveQuantities& intQuants) const;
|
||||||
|
|
||||||
|
template<class Value>
|
||||||
|
void gasOilPerfRateProd(std::vector<Value>& cq_s,
|
||||||
|
PerforationRates& perf_rates,
|
||||||
|
const Value& rv,
|
||||||
|
const Value& rs,
|
||||||
|
const Value& rvw) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -232,29 +232,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) && FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) && FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||||
const unsigned oilCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::oilCompIdx);
|
gasOilPerfRateProd(cq_s, perf_rates, rv, rs, rvw);
|
||||||
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
|
||||||
const Value cq_sOil = cq_s[oilCompIdx];
|
|
||||||
const Value cq_sGas = cq_s[gasCompIdx];
|
|
||||||
const Value dis_gas = rs * cq_sOil;
|
|
||||||
const Value vap_oil = rv * cq_sGas;
|
|
||||||
|
|
||||||
cq_s[gasCompIdx] += dis_gas;
|
|
||||||
cq_s[oilCompIdx] += vap_oil;
|
|
||||||
|
|
||||||
// recording the perforation solution gas rate and solution oil rates
|
|
||||||
if (this->isProducer()) {
|
|
||||||
perf_rates.dis_gas = getValue(dis_gas);
|
|
||||||
perf_rates.vap_oil = getValue(vap_oil);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
|
||||||
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
|
||||||
const Value vap_wat = rvw * cq_sGas;
|
|
||||||
cq_s[waterCompIdx] += vap_wat;
|
|
||||||
if (this->isProducer())
|
|
||||||
perf_rates.vap_wat = getValue(vap_wat);
|
|
||||||
}
|
|
||||||
} 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);
|
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
||||||
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
||||||
@@ -2470,4 +2448,38 @@ namespace Opm
|
|||||||
return {Base::restrictEval(cq_s_zfrac_effective), cq_s_zfrac_effective};
|
return {Base::restrictEval(cq_s_zfrac_effective), cq_s_zfrac_effective};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename TypeTag>
|
||||||
|
template<class Value>
|
||||||
|
void
|
||||||
|
StandardWell<TypeTag>::
|
||||||
|
gasOilPerfRateProd(std::vector<Value>& cq_s,
|
||||||
|
PerforationRates& perf_rates,
|
||||||
|
const Value& rv,
|
||||||
|
const Value& rs,
|
||||||
|
const Value& rvw) const
|
||||||
|
{
|
||||||
|
const unsigned oilCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::oilCompIdx);
|
||||||
|
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
||||||
|
const Value cq_sOil = cq_s[oilCompIdx];
|
||||||
|
const Value cq_sGas = cq_s[gasCompIdx];
|
||||||
|
const Value dis_gas = rs * cq_sOil;
|
||||||
|
const Value vap_oil = rv * cq_sGas;
|
||||||
|
|
||||||
|
cq_s[gasCompIdx] += dis_gas;
|
||||||
|
cq_s[oilCompIdx] += vap_oil;
|
||||||
|
|
||||||
|
// recording the perforation solution gas rate and solution oil rates
|
||||||
|
if (this->isProducer()) {
|
||||||
|
perf_rates.dis_gas = getValue(dis_gas);
|
||||||
|
perf_rates.vap_oil = getValue(vap_oil);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||||
|
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
||||||
|
const Value vap_wat = rvw * cq_sGas;
|
||||||
|
cq_s[waterCompIdx] += vap_wat;
|
||||||
|
if (this->isProducer())
|
||||||
|
perf_rates.vap_wat = getValue(vap_wat);
|
||||||
|
}
|
||||||
|
}
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|||||||
Reference in New Issue
Block a user