mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
substitute solveWellEq with one inner solve for newly opened wells
This commit is contained in:
@@ -1385,6 +1385,27 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
WellInterface<TypeTag>::
|
||||
solveWellToInitialize(const Simulator& ebosSimulator,
|
||||
WellState& well_state,
|
||||
Opm::DeferredLogger& deferred_logger)
|
||||
{
|
||||
// keep a copy of the original well state
|
||||
const WellState well_state0 = well_state;
|
||||
const double dt = ebosSimulator.timeStepSize();
|
||||
const bool converged = iterateWellEquations(ebosSimulator, B_avg_, dt, well_state, deferred_logger);
|
||||
if (converged) {
|
||||
deferred_logger.debug("Compute initial well solution for well " + name() + ". Converged");
|
||||
} else {
|
||||
const int max_iter = param_.max_welleq_iter_;
|
||||
deferred_logger.debug("Compute initial well solution for well " +name() + ". Failed to converge in "
|
||||
+ std::to_string(max_iter) + " iterations");
|
||||
well_state = well_state0;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
WellInterface<TypeTag>::addCellRates(RateVector& rates, int cellIdx) const
|
||||
|
||||
Reference in New Issue
Block a user