Fixed group control for liquid flow

This commit is contained in:
Kjetil Olsen Lye 2012-04-16 17:42:11 +02:00
parent dedc60d92d
commit 24cefa60bc
2 changed files with 17 additions and 16 deletions

View File

@ -205,14 +205,6 @@ namespace Opm
double bhp_diff = well_bhp[self_index_] - prodSpec().BHP_limit_;
double rate_diff = well_rate[self_index_] - prodSpec().fluid_volume_max_rate_;
switch(*wells_->ctrls[self_index_]->type) {
case BHP:
bhp_diff = std::abs(bhp_diff);
break;
case RATE:
rate_diff = std::abs(rate_diff);
break;
}
if(bhp_diff > epsilon) {
std::cout << "BHP exceeded, bhp_diff = " << bhp_diff << std::endl;
@ -229,14 +221,7 @@ namespace Opm
} else {
double bhp_diff = well_bhp[self_index_] - injSpec().BHP_limit_;
double flow_diff = well_rate[self_index_] - injSpec().fluid_volume_max_rate_;
switch(*wells_->ctrls[self_index_]->type) {
case BHP:
bhp_diff = std::abs(bhp_diff);
break;
case RATE:
flow_diff = std::abs(flow_diff);
break;
}
if(bhp_diff > epsilon) {
std::cout << "BHP exceeded, bhp_diff = " << bhp_diff<<std::endl;

View File

@ -525,8 +525,23 @@ namespace Opm
double parent_oil_rate = well_collection_.getLeafNodes()[i]->getParent()->prodSpec().oil_max_rate_;
double guide_rate = well_collection_.getLeafNodes()[i]->prodSpec().guide_rate_;
well_data[i].target = guide_rate * parent_oil_rate;
std::cout << "Applying guide rate" << std::endl;
break;
}
case ProductionSpecification::NONE_GRT:
{
// Will use the group control type:
const ProductionSpecification& parent_prod_spec =
well_collection_.getLeafNodes()[i]->getParent()->prodSpec();
double guide_rate = well_collection_.getLeafNodes()[i]->prodSpec().guide_rate_;
switch(parent_prod_spec.control_mode_) {
case ProductionSpecification::LRAT:
well_data[i].target = guide_rate * parent_prod_spec.liquid_max_rate_;
well_data[i].control = RATE;
break;
}
}
}
}
@ -537,6 +552,7 @@ namespace Opm
double parent_surface_rate = well_collection_.getLeafNodes()[i]->getParent()->injSpec().surface_flow_max_rate_;
double guide_rate = well_collection_.getLeafNodes()[i]->prodSpec().guide_rate_;
well_data[i].target = guide_rate * parent_surface_rate;
std::cout << "Applying guide rate" << std::endl;
}
}
}