mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3863 from totto82/unsolvable_fix
fix to --shut-unsolvable-wells=true option
This commit is contained in:
commit
ff410d268a
@ -64,7 +64,7 @@ namespace Opm
|
||||
class WellFailure
|
||||
{
|
||||
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)
|
||||
: type_(t), severity_(s), phase_(phase), well_name_(well_name)
|
||||
{
|
||||
|
@ -1225,6 +1225,11 @@ namespace Opm {
|
||||
for (const auto& well : well_container_) {
|
||||
if (well->isOperableAndSolvable() ) {
|
||||
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
|
||||
WellInterface<TypeTag>::addCellRates(RateVector& rates, int cellIdx) const
|
||||
{
|
||||
if(!this->isOperableAndSolvable())
|
||||
return;
|
||||
|
||||
for (int perfIdx = 0; perfIdx < this->number_of_perforations_; ++perfIdx) {
|
||||
if (this->cells()[perfIdx] == cellIdx) {
|
||||
for (int i = 0; i < RateVector::dimension; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user