mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix updateState() saturation update.
This commit is contained in:
parent
608a674858
commit
1e0facec4a
@ -855,13 +855,14 @@ namespace Opm {
|
||||
|
||||
// Get saturation updates.
|
||||
const double dsw = dx[0];
|
||||
double dso = -dsw;
|
||||
double dsg = 0.0;
|
||||
auto& hcstate = state_.reservoir_state.hydroCarbonState()[cell];
|
||||
if (hcstate == HydroCarbonState::GasAndOil) {
|
||||
dsg = dx[1];
|
||||
dso -= dsg;
|
||||
} else if (hcstate == HydroCarbonState::GasOnly) {
|
||||
dsg = -dsw;
|
||||
}
|
||||
const double dso = -(dsw + dsg);
|
||||
|
||||
// Handle too large saturation changes.
|
||||
const double maxval = std::max(std::fabs(dsw), std::max(std::fabs(dso), std::fabs(dsg)));
|
||||
|
Loading…
Reference in New Issue
Block a user