mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-28 16:14:25 -06:00
removed dissolved gas and vapporized oil from RESV injection rates
This commit is contained in:
parent
8ad44d046d
commit
28a567550b
@ -373,6 +373,10 @@ namespace Opm {
|
||||
const int pvtreg,
|
||||
std::vector<double>& resv_coeff) override;
|
||||
|
||||
void calcInjRates(const int fipnum,
|
||||
const int pvtreg,
|
||||
std::vector<double>& resv_coeff) override;
|
||||
|
||||
void computeWellTemperature();
|
||||
|
||||
private:
|
||||
|
@ -768,15 +768,15 @@ checkGroupHigherConstraints(const Group& group,
|
||||
->first;
|
||||
}
|
||||
|
||||
std::vector<double> resv_coeff(phase_usage_.num_phases, 0.0);
|
||||
calcRates(fipnum, pvtreg, resv_coeff);
|
||||
|
||||
std::vector<double> rates(phase_usage_.num_phases, 0.0);
|
||||
|
||||
const bool skip = switched_groups.count(group.name()) || group.name() == "FIELD";
|
||||
|
||||
if (!skip && group.isInjectionGroup()) {
|
||||
// Obtain rates for group.
|
||||
std::vector<double> resv_coeff_inj(phase_usage_.num_phases, 0.0);
|
||||
calcInjRates(fipnum, pvtreg, resv_coeff_inj);
|
||||
|
||||
for (int phasePos = 0; phasePos < phase_usage_.num_phases; ++phasePos) {
|
||||
const double local_current_rate = WellGroupHelpers::sumWellRates(group, schedule(), this->wellState(), reportStepIdx, phasePos, /* isInjector */ true);
|
||||
// Sum over all processes
|
||||
@ -802,7 +802,7 @@ checkGroupHigherConstraints(const Group& group,
|
||||
group.getGroupEfficiencyFactor(),
|
||||
schedule(),
|
||||
summaryState_,
|
||||
resv_coeff,
|
||||
resv_coeff_inj,
|
||||
deferred_logger);
|
||||
if (changed.first) {
|
||||
switched_groups.insert(group.name());
|
||||
@ -819,6 +819,8 @@ checkGroupHigherConstraints(const Group& group,
|
||||
// Sum over all processes
|
||||
rates[phasePos] = -comm_.sum(local_current_rate);
|
||||
}
|
||||
std::vector<double> resv_coeff(phase_usage_.num_phases, 0.0);
|
||||
calcRates(fipnum, pvtreg, resv_coeff);
|
||||
// Check higher up only if under individual (not FLD) control.
|
||||
const Group::ProductionCMode& currentControl = this->groupState().production_control(group.name());
|
||||
if (currentControl != Group::ProductionCMode::FLD && group.productionGroupControlAvailable()) {
|
||||
|
@ -253,6 +253,9 @@ protected:
|
||||
virtual void calcRates(const int fipnum,
|
||||
const int pvtreg,
|
||||
std::vector<double>& resv_coeff) = 0;
|
||||
virtual void calcInjRates(const int fipnum,
|
||||
const int pvtreg,
|
||||
std::vector<double>& resv_coeff) = 0;
|
||||
|
||||
data::GuideRateValue getGuideRateValues(const Group& group) const;
|
||||
data::GuideRateValue getGuideRateValues(const Well& well) const;
|
||||
|
@ -1497,6 +1497,16 @@ namespace Opm {
|
||||
rateConverter_->calcCoeff(fipnum, pvtreg, resv_coeff);
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
calcInjRates(const int fipnum,
|
||||
const int pvtreg,
|
||||
std::vector<double>& resv_coeff)
|
||||
{
|
||||
rateConverter_->calcInjCoeff(fipnum, pvtreg, resv_coeff);
|
||||
}
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
void
|
||||
|
@ -645,6 +645,41 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
|
||||
template <class Coeff>
|
||||
void
|
||||
calcInjCoeff(const RegionId r, const int pvtRegionIdx, Coeff& coeff) const
|
||||
{
|
||||
const auto& pu = phaseUsage_;
|
||||
const auto& ra = attr_.attributes(r);
|
||||
const double p = ra.pressure;
|
||||
const double T = ra.temperature;
|
||||
const double saltConcentration = ra.saltConcentration;
|
||||
|
||||
const int iw = Details::PhasePos::water(pu);
|
||||
const int io = Details::PhasePos::oil (pu);
|
||||
const int ig = Details::PhasePos::gas (pu);
|
||||
|
||||
std::fill(& coeff[0], & coeff[0] + phaseUsage_.num_phases, 0.0);
|
||||
|
||||
if (Details::PhaseUsed::water(pu)) {
|
||||
// q[w]_r = q[w]_s / bw
|
||||
|
||||
const double bw = FluidSystem::waterPvt().inverseFormationVolumeFactor(pvtRegionIdx, T, p, saltConcentration);
|
||||
|
||||
coeff[iw] = 1.0 / bw;
|
||||
}
|
||||
|
||||
if (Details::PhaseUsed::oil(pu)) {
|
||||
const double bo = FluidSystem::oilPvt().inverseFormationVolumeFactor(pvtRegionIdx, T, p, 0.0);
|
||||
coeff[io] += 1.0 / bo;
|
||||
}
|
||||
|
||||
if (Details::PhaseUsed::gas(pu)) {
|
||||
const double bg = FluidSystem::gasPvt().inverseFormationVolumeFactor(pvtRegionIdx, T, p, 0.0);
|
||||
coeff[ig] += 1.0 / bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Converting surface volume rates to reservoir voidage rates
|
||||
|
@ -132,7 +132,7 @@ getGroupInjectionControl(const Group& group,
|
||||
|
||||
// Make conversion factors for RESV <-> surface rates.
|
||||
std::vector<double> resv_coeff(pu.num_phases, 1.0);
|
||||
baseif_.rateConverter().calcCoeff(0, baseif_.pvtRegionIdx(), resv_coeff); // FIPNUM region 0 here, should use FIPNUM from WELSPECS.
|
||||
baseif_.rateConverter().calcInjCoeff(0, baseif_.pvtRegionIdx(), resv_coeff); // FIPNUM region 0 here, should use FIPNUM from WELSPECS.
|
||||
|
||||
double sales_target = 0;
|
||||
if (schedule[baseif_.currentStep()].gconsale().has(group.name())) {
|
||||
@ -406,7 +406,7 @@ assembleControlEqInj_(const WellState& well_state,
|
||||
}
|
||||
case Well::InjectorCMode::RESV: {
|
||||
std::vector<double> convert_coeff(baseif_.numPhases(), 1.0);
|
||||
baseif_.rateConverter().calcCoeff(/*fipreg*/ 0, baseif_.pvtRegionIdx(), convert_coeff);
|
||||
baseif_.rateConverter().calcInjCoeff(/*fipreg*/ 0, baseif_.pvtRegionIdx(), convert_coeff);
|
||||
|
||||
double coeff = 1.0;
|
||||
|
||||
|
@ -308,7 +308,7 @@ checkGroupConstraintsInj(const Group& group,
|
||||
|
||||
// Make conversion factors for RESV <-> surface rates.
|
||||
std::vector<double> resv_coeff(phaseUsage().num_phases, 1.0);
|
||||
rateConverter_.calcCoeff(0, pvtRegionIdx_, resv_coeff); // FIPNUM region 0 here, should use FIPNUM from WELSPECS.
|
||||
rateConverter_.calcInjCoeff(0, pvtRegionIdx_, resv_coeff); // FIPNUM region 0 here, should use FIPNUM from WELSPECS.
|
||||
|
||||
// Call check for the well's injection phase.
|
||||
return WellGroupHelpers::checkGroupConstraintsInj(name(),
|
||||
|
Loading…
Reference in New Issue
Block a user