mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: put calculation of injection gas-water perf rates in separate method
This commit is contained in:
parent
79c4797cd5
commit
bbdfa35a62
@ -489,6 +489,14 @@ namespace Opm
|
||||
const Value& rvw,
|
||||
const Value& rsw) const;
|
||||
|
||||
template<class Value>
|
||||
void gasWaterPerfRateInj(const std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
const Value& rvw,
|
||||
const Value& rsw,
|
||||
const Value& pressure,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
template<class Value>
|
||||
void disOilVapWatVolumeRatio(Value& volumeRatio,
|
||||
const Value& rvw,
|
||||
|
@ -297,29 +297,8 @@ namespace Opm
|
||||
}
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx) && FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||
//no oil
|
||||
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
||||
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
||||
|
||||
const double dw = 1.0 - getValue(rvw) * getValue(rsw);
|
||||
|
||||
if (dw <= 0.0) {
|
||||
std::ostringstream sstr;
|
||||
sstr << "Problematic d value " << dw << " obtained for well " << this->name()
|
||||
<< " during computePerfRate calculations with rsw " << rsw
|
||||
<< ", rvw " << rvw << " and pressure " << pressure
|
||||
<< " obtaining d " << dw
|
||||
<< " Continue as if no dissolution (rsw = 0) and vaporization (rvw = 0) "
|
||||
<< " for this connection.";
|
||||
deferred_logger.debug(sstr.str());
|
||||
} else {
|
||||
// vaporized water into gas
|
||||
// rvw * q_gr * b_g = rvw * (q_gs - rsw * q_ws) / dw
|
||||
perf_rates.vap_wat = getValue(rvw) * (getValue(cq_s[gasCompIdx]) - getValue(rsw) * getValue(cq_s[waterCompIdx])) / dw;
|
||||
// dissolved gas in water
|
||||
// rsw * q_wr * b_w = rsw * (q_ws - rvw * q_gs) / dw
|
||||
perf_rates.dis_gas_in_water = getValue(rsw) * (getValue(cq_s[waterCompIdx]) - getValue(rvw) * getValue(cq_s[gasCompIdx])) / dw;
|
||||
}
|
||||
|
||||
gasWaterPerfRateInj(cq_s, perf_rates, rvw, rsw,
|
||||
pressure, deferred_logger);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2481,6 +2460,43 @@ namespace Opm
|
||||
}
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
template<class Value>
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
gasWaterPerfRateInj(const std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
const Value& rvw,
|
||||
const Value& rsw,
|
||||
const Value& pressure,
|
||||
DeferredLogger& deferred_logger) const
|
||||
|
||||
{
|
||||
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
||||
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
||||
|
||||
const double dw = 1.0 - getValue(rvw) * getValue(rsw);
|
||||
|
||||
if (dw <= 0.0) {
|
||||
std::ostringstream sstr;
|
||||
sstr << "Problematic d value " << dw << " obtained for well " << this->name()
|
||||
<< " during computePerfRate calculations with rsw " << rsw
|
||||
<< ", rvw " << rvw << " and pressure " << pressure
|
||||
<< " obtaining d " << dw
|
||||
<< " Continue as if no dissolution (rsw = 0) and vaporization (rvw = 0) "
|
||||
<< " for this connection.";
|
||||
deferred_logger.debug(sstr.str());
|
||||
} else {
|
||||
// vaporized water into gas
|
||||
// rvw * q_gr * b_g = rvw * (q_gs - rsw * q_ws) / dw
|
||||
perf_rates.vap_wat = getValue(rvw) * (getValue(cq_s[gasCompIdx]) - getValue(rsw) * getValue(cq_s[waterCompIdx])) / dw;
|
||||
// dissolved gas in water
|
||||
// rsw * q_wr * b_w = rsw * (q_ws - rvw * q_gs) / dw
|
||||
perf_rates.dis_gas_in_water = getValue(rsw) * (getValue(cq_s[waterCompIdx]) - getValue(rvw) * getValue(cq_s[gasCompIdx])) / dw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
template<class Value>
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user