mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-30 11:06:55 -06:00
checking whethter group control is active
When applying group control related functions.
This commit is contained in:
parent
d38a6eb459
commit
0ab04b04cd
@ -790,10 +790,12 @@ namespace detail {
|
||||
// get reasonable initial conditions for the wells
|
||||
asImpl().wellModel().updateWellControls(well_state);
|
||||
|
||||
// enforce VREP control when necessary.
|
||||
applyVREPGroupControl(reservoir_state, well_state);
|
||||
if (asImpl().wellModel().wellCollection()->groupControlActive()) {
|
||||
// enforce VREP control when necessary.
|
||||
applyVREPGroupControl(reservoir_state, well_state);
|
||||
|
||||
asImpl().wellModel().wellCollection()->updateWellTargets(well_state.wellRates());
|
||||
asImpl().wellModel().wellCollection()->updateWellTargets(well_state.wellRates());
|
||||
}
|
||||
|
||||
// Create the primary variables.
|
||||
SolutionState state = asImpl().variableState(reservoir_state, well_state);
|
||||
@ -1097,9 +1099,12 @@ namespace detail {
|
||||
// wells active or not as parallel logging will take place that needs to
|
||||
// communicate with all processes.
|
||||
asImpl().wellModel().updateWellControls(well_state);
|
||||
// Enforce the VREP control
|
||||
applyVREPGroupControl(reservoir_state, well_state);
|
||||
asImpl().wellModel().wellCollection()->updateWellTargets(well_state.wellRates());
|
||||
|
||||
if (asImpl().wellModel().wellCollection()->groupControlActive()) {
|
||||
// Enforce the VREP control
|
||||
applyVREPGroupControl(reservoir_state, well_state);
|
||||
asImpl().wellModel().wellCollection()->updateWellTargets(well_state.wellRates());
|
||||
}
|
||||
} while (it < 15);
|
||||
|
||||
if (converged) {
|
||||
|
@ -147,6 +147,7 @@ namespace Opm {
|
||||
: wells_multisegment_( createMSWellVector(wells_arg, wells_ecl, time_step) )
|
||||
, wops_ms_(wells_multisegment_)
|
||||
, well_collection_(well_collection)
|
||||
, well_perforation_efficiency_factors_(Vector::Ones(numWells()))
|
||||
, num_phases_(wells_arg ? wells_arg->number_of_phases : 0)
|
||||
, wells_(wells_arg)
|
||||
, fluid_(nullptr)
|
||||
|
@ -904,16 +904,18 @@ namespace Opm
|
||||
break;
|
||||
}
|
||||
|
||||
// get the well node in the well collection
|
||||
WellNode& well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
if (wellCollection()->groupControlActive()) {
|
||||
// get the well node in the well collection
|
||||
WellNode& well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
|
||||
// update whehter the well is under group control or individual control
|
||||
if (well_node.groupControlIndex() >= 0 && current == well_node.groupControlIndex()) {
|
||||
// under group control
|
||||
well_node.setIndividualControl(false);
|
||||
} else {
|
||||
// individual control
|
||||
well_node.setIndividualControl(true);
|
||||
// update whehter the well is under group control or individual control
|
||||
if (well_node.groupControlIndex() >= 0 && current == well_node.groupControlIndex()) {
|
||||
// under group control
|
||||
well_node.setIndividualControl(false);
|
||||
} else {
|
||||
// individual control
|
||||
well_node.setIndividualControl(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ namespace Opm
|
||||
, wells_(wells_arg)
|
||||
, wops_(wells_arg)
|
||||
, well_collection_(well_collection)
|
||||
, well_perforation_efficiency_factors_(Vector())
|
||||
, well_perforation_efficiency_factors_(Vector::Ones(wells_!=nullptr ? wells_->well_connpos[wells_->number_of_wells] : 0))
|
||||
, fluid_(nullptr)
|
||||
, active_(nullptr)
|
||||
, phase_condition_(nullptr)
|
||||
@ -852,16 +852,20 @@ namespace Opm
|
||||
break;
|
||||
}
|
||||
|
||||
// get well node in the well collection
|
||||
WellNode& well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
|
||||
// update whehter the well is under group control or individual control
|
||||
if (well_node.groupControlIndex() >= 0 && current == well_node.groupControlIndex()) {
|
||||
// under group control
|
||||
well_node.setIndividualControl(false);
|
||||
} else {
|
||||
// individual control
|
||||
well_node.setIndividualControl(true);
|
||||
if (wellCollection()->groupControlActive()) {
|
||||
|
||||
// get well node in the well collection
|
||||
WellNode& well_node = well_collection_->findWellNode(std::string(wells().name[w]));
|
||||
|
||||
// update whehter the well is under group control or individual control
|
||||
if (well_node.groupControlIndex() >= 0 && current == well_node.groupControlIndex()) {
|
||||
// under group control
|
||||
well_node.setIndividualControl(false);
|
||||
} else {
|
||||
// individual control
|
||||
well_node.setIndividualControl(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user