mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use index according to eclipse schedule to identify deactivated wells.
This commit is contained in:
parent
012edac7ce
commit
10bfa5dfa8
@ -341,7 +341,7 @@ namespace Opm
|
|||||||
UgGridHelpers::dimensions(grid),
|
UgGridHelpers::dimensions(grid),
|
||||||
UgGridHelpers::cell2Faces(grid), UgGridHelpers::beginFaceCentroids(grid),
|
UgGridHelpers::cell2Faces(grid), UgGridHelpers::beginFaceCentroids(grid),
|
||||||
permeability, dummy_list_econ_limited, dummy_well_potentials,
|
permeability, dummy_list_econ_limited, dummy_well_potentials,
|
||||||
std::set<std::string>());
|
std::set<int>());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,8 @@ namespace Opm
|
|||||||
/// well productivity indices, otherwise it must be given in
|
/// well productivity indices, otherwise it must be given in
|
||||||
/// order to approximate these by the Peaceman formula.
|
/// order to approximate these by the Peaceman formula.
|
||||||
///
|
///
|
||||||
/// \param deactivated_wells A set of wells that should be treated
|
/// \param deactivated_wells The indices (according to the
|
||||||
|
/// eclipse schedule) of wells that should be treated
|
||||||
/// like shut wells. E.g. in a a parallel run these would be
|
/// like shut wells. E.g. in a a parallel run these would be
|
||||||
/// the wells handeled by another process. Defaults to empty set.
|
/// the wells handeled by another process. Defaults to empty set.
|
||||||
template<class F2C, class FC>
|
template<class F2C, class FC>
|
||||||
@ -94,7 +95,7 @@ namespace Opm
|
|||||||
const DynamicListEconLimited& list_econ_limited,
|
const DynamicListEconLimited& list_econ_limited,
|
||||||
bool is_parallel_run=false,
|
bool is_parallel_run=false,
|
||||||
const std::vector<double>& well_potentials={},
|
const std::vector<double>& well_potentials={},
|
||||||
const std::set<std::string>& deactivated_wells = {});
|
const std::set<int>& deactivated_wells = {});
|
||||||
|
|
||||||
WellsManager(const Opm::EclipseStateConstPtr eclipseState,
|
WellsManager(const Opm::EclipseStateConstPtr eclipseState,
|
||||||
const size_t timeStep,
|
const size_t timeStep,
|
||||||
@ -164,7 +165,7 @@ namespace Opm
|
|||||||
const double* permeability,
|
const double* permeability,
|
||||||
const DynamicListEconLimited& list_econ_limited,
|
const DynamicListEconLimited& list_econ_limited,
|
||||||
const std::vector<double>& well_potentials,
|
const std::vector<double>& well_potentials,
|
||||||
const std::set<std::string>& deactivated_wells);
|
const std::set<int>& deactivated_wells);
|
||||||
// Disable copying and assignment.
|
// Disable copying and assignment.
|
||||||
WellsManager(const WellsManager& other);
|
WellsManager(const WellsManager& other);
|
||||||
WellsManager& operator=(const WellsManager& other);
|
WellsManager& operator=(const WellsManager& other);
|
||||||
@ -189,7 +190,7 @@ namespace Opm
|
|||||||
const double* permeability,
|
const double* permeability,
|
||||||
const NTG& ntg,
|
const NTG& ntg,
|
||||||
std::vector<int>& wells_on_proc,
|
std::vector<int>& wells_on_proc,
|
||||||
const std::set<std::string>& deactivated_wells,
|
const std::set<int>& deactivated_wells,
|
||||||
const DynamicListEconLimited& list_econ_limited);
|
const DynamicListEconLimited& list_econ_limited);
|
||||||
|
|
||||||
void addChildGroups(GroupTreeNodeConstPtr parentNode, std::shared_ptr< const Schedule > schedule, size_t timeStep, const PhaseUsage& phaseUsage);
|
void addChildGroups(GroupTreeNodeConstPtr parentNode, std::shared_ptr< const Schedule > schedule, size_t timeStep, const PhaseUsage& phaseUsage);
|
||||||
|
@ -121,7 +121,7 @@ void WellsManager::createWellsFromSpecs(std::vector<const Well*>& wells, size_t
|
|||||||
const double* permeability,
|
const double* permeability,
|
||||||
const NTG& ntg,
|
const NTG& ntg,
|
||||||
std::vector<int>& wells_on_proc,
|
std::vector<int>& wells_on_proc,
|
||||||
const std::set<std::string>& ignored_wells,
|
const std::set<int>& ignored_wells,
|
||||||
const DynamicListEconLimited& list_econ_limited)
|
const DynamicListEconLimited& list_econ_limited)
|
||||||
{
|
{
|
||||||
if (dimensions != 3) {
|
if (dimensions != 3) {
|
||||||
@ -134,6 +134,8 @@ void WellsManager::createWellsFromSpecs(std::vector<const Well*>& wells, size_t
|
|||||||
wellperf_data.resize(wells.size());
|
wellperf_data.resize(wells.size());
|
||||||
wells_on_proc.resize(wells.size(), 1);
|
wells_on_proc.resize(wells.size(), 1);
|
||||||
|
|
||||||
|
auto ignored_well = ignored_wells.begin();
|
||||||
|
|
||||||
// The well index on the current process.
|
// The well index on the current process.
|
||||||
// Note that some wells are deactivated as they live on the interior
|
// Note that some wells are deactivated as they live on the interior
|
||||||
// domain of another proccess. Therefore this might different from
|
// domain of another proccess. Therefore this might different from
|
||||||
@ -141,9 +143,11 @@ void WellsManager::createWellsFromSpecs(std::vector<const Well*>& wells, size_t
|
|||||||
int active_well_index = 0;
|
int active_well_index = 0;
|
||||||
for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) {
|
for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) {
|
||||||
const auto* well = (*wellIter);
|
const auto* well = (*wellIter);
|
||||||
|
const int well_index = wellIter - wells.begin();
|
||||||
|
|
||||||
if ( ignored_wells.find(well->name()) != ignored_wells.end() ) {
|
if ( ignored_well != ignored_wells.end() && *ignored_well == well_index ) {
|
||||||
wells_on_proc[ wellIter - wells.begin() ] = 0;
|
wells_on_proc[ well_index ] = 0;
|
||||||
|
++ignored_well;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,7 +321,7 @@ WellsManager(const Opm::EclipseStateConstPtr eclipseState,
|
|||||||
const DynamicListEconLimited& list_econ_limited,
|
const DynamicListEconLimited& list_econ_limited,
|
||||||
bool is_parallel_run,
|
bool is_parallel_run,
|
||||||
const std::vector<double>& well_potentials,
|
const std::vector<double>& well_potentials,
|
||||||
const std::set<std::string>& deactivated_wells)
|
const std::set<int>& deactivated_wells)
|
||||||
: w_(0), is_parallel_run_(is_parallel_run)
|
: w_(0), is_parallel_run_(is_parallel_run)
|
||||||
{
|
{
|
||||||
init(eclipseState, timeStep, number_of_cells, global_cell,
|
init(eclipseState, timeStep, number_of_cells, global_cell,
|
||||||
@ -339,7 +343,7 @@ WellsManager::init(const Opm::EclipseStateConstPtr eclipseState,
|
|||||||
const double* permeability,
|
const double* permeability,
|
||||||
const DynamicListEconLimited& list_econ_limited,
|
const DynamicListEconLimited& list_econ_limited,
|
||||||
const std::vector<double>& well_potentials,
|
const std::vector<double>& well_potentials,
|
||||||
const std::set<std::string>& deactivated_wells)
|
const std::set<int>& deactivated_wells)
|
||||||
{
|
{
|
||||||
if (dimensions != 3) {
|
if (dimensions != 3) {
|
||||||
OPM_THROW(std::runtime_error,
|
OPM_THROW(std::runtime_error,
|
||||||
|
Loading…
Reference in New Issue
Block a user