mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding more checking for the potential values
during the well well potential calculation.
This commit is contained in:
@@ -2850,7 +2850,7 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// there should be always some avaible bhp/thp constraints there
|
// there should be always some available bhp/thp constraints there
|
||||||
if (std::isinf(bhp) || std::isnan(bhp)) {
|
if (std::isinf(bhp) || std::isnan(bhp)) {
|
||||||
OPM_THROW(std::runtime_error, "Unvalid bhp value obtained during the potential calculation for well " << wells().name[well_index]);
|
OPM_THROW(std::runtime_error, "Unvalid bhp value obtained during the potential calculation for well " << wells().name[well_index]);
|
||||||
}
|
}
|
||||||
@@ -2859,6 +2859,13 @@ namespace Opm {
|
|||||||
|
|
||||||
computeWellRatesWithBhp(ebosSimulator, bhp, well_index, potentials);
|
computeWellRatesWithBhp(ebosSimulator, bhp, well_index, potentials);
|
||||||
|
|
||||||
|
// checking whether the potentials have valid values
|
||||||
|
for (const double value : potentials) {
|
||||||
|
if (std::isinf(value) || std::isnan(value)) {
|
||||||
|
OPM_THROW(std::runtime_error, "Unvalid potential value obtained during the potential calculation for well " << wells().name[well_index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!converged) {
|
if (!converged) {
|
||||||
old_bhp = bhp;
|
old_bhp = bhp;
|
||||||
for (int p = 0; p < np; ++p) {
|
for (int p = 0; p < np; ++p) {
|
||||||
|
|||||||
Reference in New Issue
Block a user