mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapting to the change in opm-core
This commit is contained in:
parent
f85da3768e
commit
d06acaa4b5
@ -2032,13 +2032,8 @@ namespace detail {
|
|||||||
|
|
||||||
const double residualWell = detail::infinityNormWell(residual_.well_eq,
|
const double residualWell = detail::infinityNormWell(residual_.well_eq,
|
||||||
linsolver_.parallelInformation());
|
linsolver_.parallelInformation());
|
||||||
<<<<<<< 002439c5b12c64e112f06d48c747da47031c3852
|
|
||||||
converged_Well = converged_Well && (residualWell < tol_well_control);
|
converged_Well = converged_Well && (residualWell < tol_well_control);
|
||||||
=======
|
|
||||||
// Hard-coded residual for well control equations.
|
|
||||||
converged_Well = converged_Well && (residualWell < 1.e-7);
|
|
||||||
// converged_Well = converged_Well && (residualWell < Opm::unit::barsa);
|
|
||||||
>>>>>>> checking and outputing the residuals for the well equations.
|
|
||||||
const bool converged = converged_Well;
|
const bool converged = converged_Well;
|
||||||
|
|
||||||
// if one of the residuals is NaN, throw exception, so that the solver can be restarted
|
// if one of the residuals is NaN, throw exception, so that the solver can be restarted
|
||||||
@ -2681,9 +2676,7 @@ namespace detail {
|
|||||||
asImpl().wellModel().wellCollection()->applyVREPGroupControls(well_voidage_rates, voidage_conversion_coeffs);
|
asImpl().wellModel().wellCollection()->applyVREPGroupControls(well_voidage_rates, voidage_conversion_coeffs);
|
||||||
|
|
||||||
// for the wells under group control, update the currentControls for the well_state
|
// for the wells under group control, update the currentControls for the well_state
|
||||||
const size_t number_node = asImpl().wellModel().wellCollection()->numNode();
|
for (const WellNode* well_node : asImpl().wellModel().wellCollection()->getLeafNodes()) {
|
||||||
for (size_t w = 0; w < number_node; ++w) {
|
|
||||||
const WellNode* well_node = asImpl().wellModel().wellCollection()->getNode(w);
|
|
||||||
if (well_node->isInjector() && !well_node->individualControl()) {
|
if (well_node->isInjector() && !well_node->individualControl()) {
|
||||||
const int well_index = well_node->selfIndex();
|
const int well_index = well_node->selfIndex();
|
||||||
well_state.currentControls()[well_index] = well_node->groupControlIndex();
|
well_state.currentControls()[well_index] = well_node->groupControlIndex();
|
||||||
|
@ -413,7 +413,12 @@ namespace Opm {
|
|||||||
|
|
||||||
for (int w = 0; w < nw; ++w) {
|
for (int w = 0; w < nw; ++w) {
|
||||||
const std::string well_name = wells_->name[w];
|
const std::string well_name = wells_->name[w];
|
||||||
const WellNode* well_node = dynamic_cast<const WellNode *>(well_collection_->findNode(well_name));
|
// get the pointer to the well node in the well collection
|
||||||
|
WellNode* well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||||
|
// maybe should put this if in function findWellNode()
|
||||||
|
if (well_node == nullptr) {
|
||||||
|
OPM_THROW(std::runtime_error, "Could not find well " << std::string(wells().name[w]) << " in the well collection!\n");
|
||||||
|
}
|
||||||
well_efficiency_factors(w) = well_node->getAccumulativeEfficiencyFactor();
|
well_efficiency_factors(w) = well_node->getAccumulativeEfficiencyFactor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user