mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Move the update of rs and rv after the phase transitions
The old rs and rv values are used in the phase transitions calculations. The update of rs and rv to the state is therefore moved after the phase transitions in order for the code to use the old values.
This commit is contained in:
parent
16951bbd39
commit
662a2faf76
@ -1420,12 +1420,6 @@ namespace {
|
||||
rv = rv_old - drv_limited;
|
||||
}
|
||||
|
||||
// Update the state
|
||||
if (has_disgas_)
|
||||
std::copy(&rs[0], &rs[0] + nc, state.gasoilratio().begin());
|
||||
|
||||
if (has_vapoil_)
|
||||
std::copy(&rv[0], &rv[0] + nc, state.rv().begin());
|
||||
|
||||
// Sg is used as primal variable for water only cells.
|
||||
const double epsilon = std::sqrt(std::numeric_limits<double>::epsilon());
|
||||
@ -1479,6 +1473,14 @@ namespace {
|
||||
|
||||
}
|
||||
|
||||
// Update the state
|
||||
if (has_disgas_) {
|
||||
std::copy(&rs[0], &rs[0] + nc, state.gasoilratio().begin());
|
||||
}
|
||||
|
||||
if (has_vapoil_) {
|
||||
std::copy(&rv[0], &rv[0] + nc, state.rv().begin());
|
||||
}
|
||||
|
||||
// Qs update.
|
||||
// Since we need to update the wellrates, that are ordered by wells,
|
||||
|
Loading…
Reference in New Issue
Block a user