This commit is contained in:
Tor Harald Sandve
2021-09-13 15:11:38 +02:00
parent 43a858ef25
commit 49dfe1006f

View File

@@ -1743,22 +1743,20 @@ namespace Opm
return rates; return rates;
}; };
auto bhp = this->MultisegmentWellGeneric<Scalar>:: auto bhpAtLimit = this->MultisegmentWellGeneric<Scalar>::
computeBhpAtThpLimitProd(frates, computeBhpAtThpLimitProd(frates,
summary_state, summary_state,
maxPerfPress(ebos_simulator), maxPerfPress(ebos_simulator),
getRefDensity(), getRefDensity(),
deferred_logger); deferred_logger);
if(bhp) if(bhpAtLimit)
return bhp; return bhpAtLimit;
auto fratesIter = [this, &ebos_simulator, &deferred_logger](const double bhp) { auto fratesIter = [this, &ebos_simulator, &deferred_logger](const double bhp) {
// Not solving the well equations here, which means we are // Solver the well iterations to see if we are
// calculating at the current Fg/Fw values of the // able to get a solution with an update
// well. This does not matter unless the well is // solution
// crossflowing, and then it is likely still a good
// approximation.
std::vector<double> rates(3); std::vector<double> rates(3);
computeWellRatesWithBhpIterations(ebos_simulator, bhp, rates, deferred_logger); computeWellRatesWithBhpIterations(ebos_simulator, bhp, rates, deferred_logger);
return rates; return rates;
@@ -1795,21 +1793,19 @@ namespace Opm
return rates; return rates;
}; };
auto bhp = this->MultisegmentWellGeneric<Scalar>:: auto bhpAtLimit = this->MultisegmentWellGeneric<Scalar>::
computeBhpAtThpLimitInj(frates, computeBhpAtThpLimitInj(frates,
summary_state, summary_state,
getRefDensity(), getRefDensity(),
deferred_logger); deferred_logger);
if(bhp) if(bhpAtLimit)
return bhp; return bhpAtLimit;
auto fratesIter = [this, &ebos_simulator, &deferred_logger](const double bhp) { auto fratesIter = [this, &ebos_simulator, &deferred_logger](const double bhp) {
// Not solving the well equations here, which means we are // Solver the well iterations to see if we are
// calculating at the current Fg/Fw values of the // able to get a solution with an update
// well. This does not matter unless the well is // solution
// crossflowing, and then it is likely still a good
// approximation.
std::vector<double> rates(3); std::vector<double> rates(3);
computeWellRatesWithBhpIterations(ebos_simulator, bhp, rates, deferred_logger); computeWellRatesWithBhpIterations(ebos_simulator, bhp, rates, deferred_logger);
return rates; return rates;