mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix to --shut-unsolvable-wells=true option
This commit is contained in:
@@ -64,7 +64,7 @@ namespace Opm
|
|||||||
class WellFailure
|
class WellFailure
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum struct Type { Invalid, MassBalance, Pressure, ControlBHP, ControlTHP, ControlRate };
|
enum struct Type { Invalid, MassBalance, Pressure, ControlBHP, ControlTHP, ControlRate, Unsolvable };
|
||||||
WellFailure(Type t, Severity s, int phase, const std::string& well_name)
|
WellFailure(Type t, Severity s, int phase, const std::string& well_name)
|
||||||
: type_(t), severity_(s), phase_(phase), well_name_(well_name)
|
: type_(t), severity_(s), phase_(phase), well_name_(well_name)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1225,6 +1225,11 @@ namespace Opm {
|
|||||||
for (const auto& well : well_container_) {
|
for (const auto& well : well_container_) {
|
||||||
if (well->isOperableAndSolvable() ) {
|
if (well->isOperableAndSolvable() ) {
|
||||||
local_report += well->getWellConvergence(this->wellState(), B_avg, local_deferredLogger, iterationIdx > param_.strict_outer_iter_wells_ );
|
local_report += well->getWellConvergence(this->wellState(), B_avg, local_deferredLogger, iterationIdx > param_.strict_outer_iter_wells_ );
|
||||||
|
} else {
|
||||||
|
ConvergenceReport report;
|
||||||
|
using CR = ConvergenceReport;
|
||||||
|
report.setWellFailed({CR::WellFailure::Type::Unsolvable, CR::Severity::Normal, -1, well->name()});
|
||||||
|
local_report += report;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -536,6 +536,9 @@ namespace Opm
|
|||||||
void
|
void
|
||||||
WellInterface<TypeTag>::addCellRates(RateVector& rates, int cellIdx) const
|
WellInterface<TypeTag>::addCellRates(RateVector& rates, int cellIdx) const
|
||||||
{
|
{
|
||||||
|
if(!this->isOperableAndSolvable())
|
||||||
|
return;
|
||||||
|
|
||||||
for (int perfIdx = 0; perfIdx < this->number_of_perforations_; ++perfIdx) {
|
for (int perfIdx = 0; perfIdx < this->number_of_perforations_; ++perfIdx) {
|
||||||
if (this->cells()[perfIdx] == cellIdx) {
|
if (this->cells()[perfIdx] == cellIdx) {
|
||||||
for (int i = 0; i < RateVector::dimension; ++i) {
|
for (int i = 0; i < RateVector::dimension; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user