From 2b59222abc392515245ed878cdc5057c5efe7638 Mon Sep 17 00:00:00 2001 From: Vegard Kippe Date: Fri, 6 Dec 2024 15:26:19 +0100 Subject: [PATCH] Ensure tracer flow for cross-flowing injector connections is included --- opm/simulators/flow/TracerModel.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opm/simulators/flow/TracerModel.hpp b/opm/simulators/flow/TracerModel.hpp index 516d22208..497419a05 100644 --- a/opm/simulators/flow/TracerModel.hpp +++ b/opm/simulators/flow/TracerModel.hpp @@ -515,6 +515,10 @@ protected: } else if (rate_f < 0) { for (int tIdx = 0; tIdx < tr.numTracer(); ++tIdx) { + // Store _injector_ tracer rate for cross-flowing well connections (can be done here since WTRACER is constant) + this->wellTracerRate_.at(std::make_pair(eclWell.name(),this->name(tr.idx_[tIdx]))) += rate_f*wtracer[tIdx]; + this->wellFreeTracerRate_.at(std::make_pair(eclWell.name(),this->wellfname(tr.idx_[tIdx]))) += rate_f*wtracer[tIdx]; + // Production of free tracer tr.residual_[tIdx][I][0] -= rate_f * tr.concentration_[tIdx][I][0];