mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding applyVREPGroupControl() to StandardWellsDense.
This commit is contained in:
@@ -375,6 +375,11 @@ namespace Opm {
|
|||||||
|
|
||||||
SimulatorReport report;
|
SimulatorReport report;
|
||||||
|
|
||||||
|
// when having VREP group control, update the rate converter based on reservoir state
|
||||||
|
if ( wellModel().wellCollection()->havingVREPGroups() ) {
|
||||||
|
updateRateConverter(reservoir_state);
|
||||||
|
}
|
||||||
|
|
||||||
// -------- Mass balance equations --------
|
// -------- Mass balance equations --------
|
||||||
assembleMassBalanceEq(timer, iterationIdx, reservoir_state);
|
assembleMassBalanceEq(timer, iterationIdx, reservoir_state);
|
||||||
|
|
||||||
|
|||||||
@@ -1378,6 +1378,7 @@ enum WellVariablePositions {
|
|||||||
|
|
||||||
// upate the well targets following the group control
|
// upate the well targets following the group control
|
||||||
if (wellCollection()->groupControlActive()) {
|
if (wellCollection()->groupControlActive()) {
|
||||||
|
applyVREPGroupControl(xw);
|
||||||
wellCollection()->updateWellTargets(xw.wellRates());
|
wellCollection()->updateWellTargets(xw.wellRates());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1689,7 +1690,7 @@ enum WellVariablePositions {
|
|||||||
std::vector<double> convert_coeff(np, 1.0);
|
std::vector<double> convert_coeff(np, 1.0);
|
||||||
|
|
||||||
for (int w = 0; w < nw; ++w) {
|
for (int w = 0; w < nw; ++w) {
|
||||||
const bool is_producer = wells->type[w] == PRODUCER;
|
const bool is_producer = wells().type[w] == PRODUCER;
|
||||||
|
|
||||||
// not sure necessary to change all the value to be positive
|
// not sure necessary to change all the value to be positive
|
||||||
if (is_producer) {
|
if (is_producer) {
|
||||||
@@ -1720,6 +1721,28 @@ enum WellVariablePositions {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void applyVREPGroupControl(WellState& well_state) const
|
||||||
|
{
|
||||||
|
if ( wellCollection()->havingVREPGroups() ) {
|
||||||
|
std::vector<double> well_voidage_rates;
|
||||||
|
std::vector<double> voidage_conversion_coeffs;
|
||||||
|
computeWellVoidageRates(well_state, well_voidage_rates, voidage_conversion_coeffs);
|
||||||
|
wellCollection()->applyVREPGroupControls(well_voidage_rates, voidage_conversion_coeffs);
|
||||||
|
|
||||||
|
// for the wells under group control, update the currentControls for the well_state
|
||||||
|
for (const WellNode* well_node : wellCollection()->getLeafNodes()) {
|
||||||
|
if (well_node->isInjector() && !well_node->individualControl()) {
|
||||||
|
const int well_index = well_node->selfIndex();
|
||||||
|
well_state.currentControls()[well_index] = well_node->groupControlIndex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool wells_active_;
|
bool wells_active_;
|
||||||
const Wells* wells_;
|
const Wells* wells_;
|
||||||
|
|||||||
Reference in New Issue
Block a user