From b65f85a6c4051028d5f3f9a5bad1d72fdbc81b68 Mon Sep 17 00:00:00 2001 From: Svenn Tveit Date: Wed, 31 Jan 2024 18:18:19 +0100 Subject: [PATCH] Add solvent rate in GRAT control mode --- opm/simulators/wells/StandardWellAssemble.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opm/simulators/wells/StandardWellAssemble.cpp b/opm/simulators/wells/StandardWellAssemble.cpp index fc7b70d7f..43af362b4 100644 --- a/opm/simulators/wells/StandardWellAssemble.cpp +++ b/opm/simulators/wells/StandardWellAssemble.cpp @@ -113,6 +113,9 @@ assembleControlEq(const WellState& well_state, if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) { rates[Gas] = primary_variables.getQs(Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx)); } + if constexpr (Indices::enableSolvent) { + rates[Gas] += primary_variables.getQs(Indices::contiSolventEqIdx); + } return rates; };