handling WELL workover over ratio economic limit.

This commit is contained in:
Kai Bao 2017-10-11 07:55:48 +02:00
parent de1be6b5ef
commit 5328de6361

View File

@ -636,11 +636,11 @@ namespace Opm
if (well_ecl_->getAutomaticShutIn()) {
list_econ_limited.addShutWell(well_name);
const std::string msg = std::string("well ") + well_name + std::string(" will be shut in due to economic limit");
const std::string msg = std::string("well ") + well_name + std::string(" will be shut in due to rate economic limit");
OpmLog::info(msg);
} else {
list_econ_limited.addStoppedWell(well_name);
const std::string msg = std::string("well ") + well_name + std::string(" will be stopped due to economic limit");
const std::string msg = std::string("well ") + well_name + std::string(" will be stopped due to rate economic limit");
OpmLog::info(msg);
}
// the well is closed, not need to check other limits
@ -657,6 +657,10 @@ namespace Opm
}
if (ratio_limits_violated) {
const WellEcon::WorkoverEnum workover = econ_production_limits.workover();
switch (workover) {
case WellEcon::CON:
{
const bool last_connection = std::get<1>(ratio_check_return);
const int worst_offending_connection = std::get<2>(ratio_check_return);
@ -669,10 +673,33 @@ namespace Opm
OpmLog::info(msg);
if (last_connection) {
// TODO: there is more things to check here
list_econ_limited.addShutWell(well_name);
const std::string msg2 = well_name + std::string(" will be shut due to the last connection closed");
OpmLog::info(msg2);
}
break;
}
case WellEcon::WELL:
{
if (well_ecl_->getAutomaticShutIn()) {
list_econ_limited.addShutWell(well_name);
const std::string msg = well_name + std::string(" will be shut due to ratio economic limit");
OpmLog::info(msg);
} else {
list_econ_limited.addStoppedWell(well_name);
const std::string msg = well_name + std::string(" will be stopped due to ratio economic limit");
OpmLog::info(msg);
}
break;
}
case WellEcon::NONE:
break;
default:
{
OpmLog::warning("NOT_SUPPORTED_WORKOVER_TYPE", "not supporting workover type " + WellEcon::WorkoverEnumToString(workover) );
}
}
}
}