Skip to content

Commit

Permalink
Only write SWELL and XWELL for water tracers.
Browse files Browse the repository at this point in the history
With current implementation only water tracers can be written to restart-related output.
  • Loading branch information
svenn-t committed May 21, 2024
1 parent a685674 commit 4f52cb6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions opm/output/eclipse/AggregateWellData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,10 @@ namespace {
auto output_index = static_cast<std::size_t>(VI::SWell::index::TracerOffset);

for (const auto& tracer : tracers) {
sWell[output_index++] =
smry.get_well_var(wname, fmt::format("WTIC{}", tracer.name), 0.0);
if (tracer.phase == Opm::Phase::WATER) {
sWell[output_index++] =
smry.get_well_var(wname, fmt::format("WTIC{}", tracer.name), 0.0);
}
}
}

Expand Down Expand Up @@ -1332,7 +1334,7 @@ namespace {
const Opm::Well& well,
XWellArray& xWell)
{
if (tracers.empty())
if (tracers.empty() || tracer_dims.water_tracers() == 0)
return;

using Ix = ::Opm::RestartIO::Helpers::VectorItems::XWell::index;
Expand Down

0 comments on commit 4f52cb6

Please sign in to comment.