From cb5238f5dc09a0027adc394d67b4a13f6281592c Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Mon, 19 Sep 2016 11:10:14 +0200 Subject: [PATCH] BUGFIX Updated solvent model after #825 Store rsSat and rvSat in simulator container for outut. --- opm/autodiff/BlackoilSolventModel_impl.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/opm/autodiff/BlackoilSolventModel_impl.hpp b/opm/autodiff/BlackoilSolventModel_impl.hpp index 437478bb5..3ce6dfaa9 100644 --- a/opm/autodiff/BlackoilSolventModel_impl.hpp +++ b/opm/autodiff/BlackoilSolventModel_impl.hpp @@ -220,17 +220,17 @@ namespace Opm { if (active_[ Oil ]) { // RS and RV is only defined if both oil and gas phase are active. state.canonical_phase_pressures = computePressures(state.pressure, state.saturation[pu.phase_pos[ Water ]], so, sg, state.solvent_saturation); - const ADB rsSat = fluidRsSat(state.canonical_phase_pressures[ Oil ], so , cells_); + sd_.rsSat = fluidRsSat(state.canonical_phase_pressures[ Oil ], so , cells_); if (has_disgas_) { - state.rs = (1-Base::isRs_)*rsSat + Base::isRs_*xvar; + state.rs = (1-Base::isRs_)*sd_.rsSat + Base::isRs_*xvar; } else { - state.rs = rsSat; + state.rs = sd_.rsSat; } - const ADB rvSat = fluidRvSat(state.canonical_phase_pressures[ Gas ], so , cells_); + sd_.rvSat = fluidRvSat(state.canonical_phase_pressures[ Gas ], so , cells_); if (has_vapoil_) { - state.rv = (1-Base::isRv_)*rvSat + Base::isRv_*xvar; + state.rv = (1-Base::isRv_)*sd_.rvSat + Base::isRv_*xvar; } else { - state.rv = rvSat; + state.rv = sd_.rvSat; } } } @@ -549,6 +549,7 @@ namespace Opm { if (has_disgas_) { const V rsSat0 = fluidRsSat(p_old, s_old.col(pu.phase_pos[Oil]), cells_); const V rsSat = fluidRsSat(p, so, cells_); + sd_.rsSat = ADB::constant(rsSat); // The obvious case auto hasGas = (sg > 0 && Base::isRs_ == 0); @@ -574,6 +575,7 @@ namespace Opm { const V gaspress = computeGasPressure(p, sw, so, sg); const V rvSat0 = fluidRvSat(gaspress_old, s_old.col(pu.phase_pos[Oil]), cells_); const V rvSat = fluidRvSat(gaspress, so, cells_); + sd_.rvSat = ADB::constant(rvSat); // The obvious case auto hasOil = (so > 0 && Base::isRv_ == 0);