adding support for the FLD for the control type of group control.
And also adding support for the liquid rate type of guide rate type.
This commit is contained in:
parent
59ef5f2b11
commit
f79fe1f7ad
@ -22,7 +22,7 @@ namespace Opm
|
||||
|
||||
enum GuideRateType
|
||||
{
|
||||
OIL, GAS, WATER, NONE_GRT
|
||||
OIL, GAS, WATER, LIQ, NONE_GRT
|
||||
};
|
||||
|
||||
ProductionSpecification();
|
||||
|
@ -783,7 +783,17 @@ namespace Opm
|
||||
if ( well->isProducer(timeStep) ) {
|
||||
// The guide rates is calculated based on the group control
|
||||
// Currently only supporting WRAT, ORAT and GRAT.
|
||||
switch (group.prodSpec().control_mode_) {
|
||||
ProductionSpecification::ControlMode control_mode = group.prodSpec().control_mode_;
|
||||
if (control_mode == ProductionSpecification::FLD) {
|
||||
if (group.getParent() != nullptr) {
|
||||
const WellsGroupInterface& higher_group = *(group.getParent());
|
||||
control_mode = higher_group.prodSpec().control_mode_;
|
||||
} else {
|
||||
OPM_THROW(std::runtime_error, "Group " << group.name() << " is under FLD control while no higher level of group is specified.");
|
||||
}
|
||||
}
|
||||
|
||||
switch (control_mode) {
|
||||
case ProductionSpecification::WRAT: {
|
||||
if (!phaseUsage.phase_used[BlackoilPhases::Aqua]) {
|
||||
OPM_THROW(std::runtime_error, "Water phase not used, yet found water rate controlled well.");
|
||||
@ -811,6 +821,25 @@ namespace Opm
|
||||
wellnode.prodSpec().guide_rate_type_ = ProductionSpecification::GAS;
|
||||
break;
|
||||
}
|
||||
case ProductionSpecification::FLD: {
|
||||
OPM_THROW(std::logic_error, "Not support more than one continous level of FLD control");
|
||||
}
|
||||
case ProductionSpecification::LRAT: {
|
||||
double guide_rate = 0;
|
||||
if (phaseUsage.phase_used[BlackoilPhases::Liquid]) {
|
||||
const int oil_index = phaseUsage.phase_pos[BlackoilPhases::Liquid];
|
||||
const double potential_oil = well_potentials[np*wix + oil_index];
|
||||
guide_rate += potential_oil;
|
||||
}
|
||||
if (phaseUsage.phase_used[BlackoilPhases::Aqua]) {
|
||||
const int water_index = phaseUsage.phase_pos[BlackoilPhases::Aqua];
|
||||
const double potential_water = well_potentials[np*wix + water_index];
|
||||
guide_rate += potential_water;
|
||||
}
|
||||
// not sure if no water and no oil, what will happen here, zero guide_rate?
|
||||
wellnode.prodSpec().guide_rate_ = guide_rate;
|
||||
wellnode.prodSpec().guide_rate_type_ = ProductionSpecification::LIQ;
|
||||
}
|
||||
case ProductionSpecification::NONE: {
|
||||
// Group control is not in use for this group.
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user