diff --git a/CMakeLists.txt b/CMakeLists.txt
index 386d9e1d8..ab2cb78ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -432,7 +432,7 @@ set(FLOW_MODELS blackoil brine energy extbo foam gasoil gaswater
gasoil_energy brine_saltprecipitation
gaswater_saltprec_vapwat gaswater_saltprec_energy brine_precsalt_vapwat
blackoil_legacyassembly gasoildiffuse gaswater_dissolution
- gaswater_dissolution_diffuse gaswater_energy)
+ gaswater_dissolution_diffuse gaswater_energy gaswater_solvent)
set(FLOW_VARIANT_MODELS brine_energy onephase onephase_energy)
set(FLOW_TGTS)
diff --git a/flow/flow_ebos_gaswater_solvent.cpp b/flow/flow_ebos_gaswater_solvent.cpp
new file mode 100644
index 000000000..fa5a75ba4
--- /dev/null
+++ b/flow/flow_ebos_gaswater_solvent.cpp
@@ -0,0 +1,90 @@
+/*
+ This file is part of the Open Porous Media project (OPM).
+
+ OPM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OPM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OPM. If not, see .
+*/
+#include "config.h"
+
+// Define making clear that the simulator supports AMG
+#define FLOW_SUPPORT_AMG 1
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+
+namespace Opm {
+namespace Properties {
+namespace TTag {
+struct EclFlowGasWaterSolventProblem {
+ using InheritsFrom = std::tuple;
+};
+}
+
+template
+struct EnableSolvent {
+ static constexpr bool value = true;
+};
+
+//! The indices required by the model
+template
+struct Indices
+{
+private:
+ // it is unfortunately not possible to simply use 'TypeTag' here because this leads
+ // to cyclic definitions of some properties. if this happens the compiler error
+ // messages unfortunately are *really* confusing and not really helpful.
+ using BaseTypeTag = TTag::EclFlowProblem;
+ using FluidSystem = GetPropType;
+
+public:
+ typedef BlackOilTwoPhaseIndices(),
+ getPropValue(),
+ getPropValue(),
+ getPropValue(),
+ getPropValue(),
+ getPropValue(),
+ /*PVOffset=*/0,
+ /*disabledCompIdx=*/FluidSystem::oilCompIdx,
+ getPropValue()> type;
+};
+}}
+
+namespace Opm {
+
+
+// ----------------- Main program -----------------
+int flowEbosGasWaterSolventMain(int argc, char** argv, bool outputCout, bool outputFiles)
+{
+ // we always want to use the default locale, and thus spare us the trouble
+ // with incorrect locale settings.
+ resetLocale();
+
+ FlowMainEbos
+ mainfunc {argc, argv, outputCout, outputFiles} ;
+ return mainfunc.execute();
+}
+
+int flowEbosGasWaterSolventMainStandalone(int argc, char** argv)
+{
+ using TypeTag = Properties::TTag::EclFlowGasWaterSolventProblem;
+ auto mainObject = Opm::Main(argc, argv);
+ return mainObject.runStatic();
+}
+
+}
diff --git a/flow/flow_ebos_gaswater_solvent.hpp b/flow/flow_ebos_gaswater_solvent.hpp
new file mode 100644
index 000000000..7b21bc16d
--- /dev/null
+++ b/flow/flow_ebos_gaswater_solvent.hpp
@@ -0,0 +1,30 @@
+/*
+ This file is part of the Open Porous Media project (OPM).
+
+ OPM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OPM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OPM. If not, see .
+*/
+#ifndef FLOW_EBOS_GASWATER_SOLVENT_HPP
+#define FLOW_EBOS_GASWATER_SOLVENT_HPP
+
+namespace Opm {
+
+//! \brief Main function used in flow binary.
+int flowEbosGasWaterSolventMain(int argc, char** argv, bool outputCout, bool outputFiles);
+
+//! \brief Main function used in flow_gaswater_solvent binary.
+int flowEbosGasWaterSolventMainStandalone(int argc, char** argv);
+
+}
+
+#endif // FLOW_EBOS_GASWATER_SOLVENT_HPP
diff --git a/flow/flow_gaswater_solvent.cpp b/flow/flow_gaswater_solvent.cpp
new file mode 100644
index 000000000..eba1fe96d
--- /dev/null
+++ b/flow/flow_gaswater_solvent.cpp
@@ -0,0 +1,24 @@
+/*
+ This file is part of the Open Porous Media project (OPM).
+
+ OPM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OPM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OPM. If not, see .
+*/
+#include "config.h"
+#include
+
+
+int main(int argc, char** argv)
+{
+ return Opm::flowEbosGasWaterSolventMainStandalone(argc, argv);
+}
diff --git a/opm/simulators/flow/Main.hpp b/opm/simulators/flow/Main.hpp
index d6e876f7b..3465546ee 100644
--- a/opm/simulators/flow/Main.hpp
+++ b/opm/simulators/flow/Main.hpp
@@ -30,6 +30,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -592,7 +593,21 @@ private:
if (phases.active(Phase::FOAM)) {
return flowEbosSolventFoamMain(argc_, argv_, outputCout_, outputFiles_);
}
- return flowEbosSolventMain(argc_, argv_, outputCout_, outputFiles_);
+ // solvent + gas + water
+ if (!phases.active( Phase::OIL ) && phases.active( Phase::WATER ) && phases.active( Phase::GAS )) {
+ return flowEbosGasWaterSolventMain(argc_, argv_, outputCout_, outputFiles_);
+ }
+
+ // solvent + gas + water + oil
+ if (phases.active( Phase::OIL ) && phases.active( Phase::WATER ) && phases.active( Phase::GAS )) {
+ return flowEbosSolventMain(argc_, argv_, outputCout_, outputFiles_);
+ }
+
+ if (outputCout_)
+ std::cerr << "No valid configuration is found for solvent simulation, valid options include "
+ << "gas + water + solvent and gas + oil + water + solvent" << std::endl;
+
+ return EXIT_FAILURE;
}
int runExtendedBlackOil()
diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp
index d95772642..aa47b599e 100644
--- a/opm/simulators/wells/BlackoilWellModel_impl.hpp
+++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp
@@ -1926,14 +1926,10 @@ namespace Opm {
// in the well equations. As a result, for an oil-water-polymer system, this function will return 2.
// In some way, it makes this function appear to be confusing from its name, and we need
// to revisit/revise this function again when extending the variants of system that flow can simulate.
- if (numPhases() < 3) {
- return numPhases();
- }
- int numComp = FluidSystem::numComponents;
+ int numComp = numPhases() < 3? numPhases(): FluidSystem::numComponents;
if constexpr (has_solvent_) {
- numComp ++;
+ numComp++;
}
-
return numComp;
}
diff --git a/opm/simulators/wells/MultisegmentWellAssemble.cpp b/opm/simulators/wells/MultisegmentWellAssemble.cpp
index 6baea521a..0743c9491 100644
--- a/opm/simulators/wells/MultisegmentWellAssemble.cpp
+++ b/opm/simulators/wells/MultisegmentWellAssemble.cpp
@@ -387,6 +387,8 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
+
// Blackoil
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,1u,0u>)
diff --git a/opm/simulators/wells/MultisegmentWellEval.cpp b/opm/simulators/wells/MultisegmentWellEval.cpp
index c1b33ecac..38286486d 100644
--- a/opm/simulators/wells/MultisegmentWellEval.cpp
+++ b/opm/simulators/wells/MultisegmentWellEval.cpp
@@ -533,6 +533,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
// Blackoil
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
INSTANCE(BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
diff --git a/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp b/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp
index 6a8090cb0..c955818a5 100644
--- a/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp
+++ b/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp
@@ -634,6 +634,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,2u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
// Blackoil
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
INSTANCE(BlackOilIndices<1u,0u,0u,0u,false,false,0u,0u>)
diff --git a/opm/simulators/wells/MultisegmentWellSegments.cpp b/opm/simulators/wells/MultisegmentWellSegments.cpp
index 83790c149..3164978ab 100644
--- a/opm/simulators/wells/MultisegmentWellSegments.cpp
+++ b/opm/simulators/wells/MultisegmentWellSegments.cpp
@@ -798,6 +798,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
// Blackoil
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
INSTANCE(BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
diff --git a/opm/simulators/wells/StandardWellAssemble.cpp b/opm/simulators/wells/StandardWellAssemble.cpp
index a6caeed8e..fc7b70d7f 100644
--- a/opm/simulators/wells/StandardWellAssemble.cpp
+++ b/opm/simulators/wells/StandardWellAssemble.cpp
@@ -273,6 +273,7 @@ INSTANCE(7u, BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,2u,0u>)
INSTANCE(8u, BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
INSTANCE(7u, BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(8u, BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(7u, BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
// Blackoil
INSTANCE(8u, BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
INSTANCE(9u, BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
diff --git a/opm/simulators/wells/StandardWellConnections.cpp b/opm/simulators/wells/StandardWellConnections.cpp
index ddcdb108a..301c24edd 100644
--- a/opm/simulators/wells/StandardWellConnections.cpp
+++ b/opm/simulators/wells/StandardWellConnections.cpp
@@ -558,6 +558,8 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,2u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
+
// Blackoil
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
INSTANCE(BlackOilIndices<1u,0u,0u,0u,false,false,0u,0u>)
@@ -568,7 +570,6 @@ INSTANCE(BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,true,0u,0u>)
INSTANCE(BlackOilIndices<0u,0u,0u,1u,false,true,0u,0u>)
INSTANCE(BlackOilIndices<0u,0u,0u,1u,false,false,1u,0u>)
-
INSTANCE(BlackOilIndices<1u,0u,0u,0u,true,false,0u,0u>)
}
diff --git a/opm/simulators/wells/StandardWellEval.cpp b/opm/simulators/wells/StandardWellEval.cpp
index efe93416f..71f44fd67 100644
--- a/opm/simulators/wells/StandardWellEval.cpp
+++ b/opm/simulators/wells/StandardWellEval.cpp
@@ -221,6 +221,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
// Blackoil
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
INSTANCE(BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>)
diff --git a/opm/simulators/wells/StandardWellPrimaryVariables.cpp b/opm/simulators/wells/StandardWellPrimaryVariables.cpp
index ff4654fbb..f6f610e93 100644
--- a/opm/simulators/wells/StandardWellPrimaryVariables.cpp
+++ b/opm/simulators/wells/StandardWellPrimaryVariables.cpp
@@ -175,8 +175,9 @@ update(const WellState& well_state,
(Indices::enableSolvent ? ws.sum_solvent_rates() : 0.0) ) / total_well_rate ;
}
if constexpr (Indices::enableSolvent) {
- value_[SFrac] = well_.scalingFactor(pu.phase_pos[Gas]) * ws.sum_solvent_rates() / total_well_rate ;
+ value_[SFrac] = well_.scalingFactor(Indices::contiSolventEqIdx) * ws.sum_solvent_rates() / total_well_rate ;
}
+
} else { // total_well_rate == 0
if (well_.isInjector()) {
// only single phase injection handled
@@ -355,6 +356,11 @@ copyToWellState(WellState& well_state,
F[gas_pos] = value_[GFrac];
F[water_pos] -= F[gas_pos];
}
+
+ if constexpr (Indices::enableSolvent) {
+ F_solvent = value_[SFrac];
+ F[water_pos] -= F_solvent;
+ }
}
else if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
const int gas_pos = pu.phase_pos[Gas];
@@ -438,45 +444,31 @@ volumeFraction(const unsigned compIdx) const
return EvalWell(numWellEq_ + Indices::numEq, 1.0);
}
+ if (has_gfrac_variable && compIdx == Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx)) {
+ return evaluation_[GFrac];
+ }
+
+ if (Indices::enableSolvent && compIdx == (unsigned)Indices::contiSolventEqIdx) {
+ return evaluation_[SFrac];
+ }
+
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
if (has_wfrac_variable && compIdx == Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx)) {
return evaluation_[WFrac];
}
-
- if (has_gfrac_variable && compIdx == Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx)) {
- return evaluation_[GFrac];
- }
-
- if (Indices::enableSolvent && compIdx == (unsigned)Indices::contiSolventEqIdx) {
- return evaluation_[SFrac];
- }
}
- else if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
- if (has_gfrac_variable && compIdx == Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx)) {
- return evaluation_[GFrac];
- }
- }
-
- // Oil or WATER fraction
+ // Compute the Oil fraction if oil is present
+ // or the WATER fraction for a gas-water case
EvalWell well_fraction(numWellEq_ + Indices::numEq, 1.0);
- if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
- if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
- well_fraction -= evaluation_[WFrac];
- }
-
- if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
- well_fraction -= evaluation_[GFrac];
- }
-
- if constexpr (Indices::enableSolvent) {
- well_fraction -= evaluation_[SFrac];
- }
+ if (has_wfrac_variable && FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
+ well_fraction -= evaluation_[WFrac];
}
- else if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) &&
- FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
+ if (has_gfrac_variable) {
well_fraction -= evaluation_[GFrac];
}
-
+ if constexpr (Indices::enableSolvent) {
+ well_fraction -= evaluation_[SFrac];
+ }
return well_fraction;
}
@@ -567,6 +559,8 @@ processFractions()
const auto pu = well_.phaseUsage();
std::vector F(well_.numPhases(), 0.0);
+ [[maybe_unused]] double F_solvent = 0.0;
+
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
F[pu.phase_pos[Oil]] = 1.0;
@@ -579,6 +573,10 @@ processFractions()
F[pu.phase_pos[Gas]] = value_[GFrac];
F[pu.phase_pos[Oil]] -= F[pu.phase_pos[Gas]];
}
+ if constexpr (Indices::enableSolvent) {
+ F_solvent = value_[SFrac];
+ F[pu.phase_pos[Oil]] -= F_solvent;
+ }
}
else if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
F[pu.phase_pos[Water]] = 1.0;
@@ -587,17 +585,15 @@ processFractions()
F[pu.phase_pos[Gas]] = value_[GFrac];
F[pu.phase_pos[Water]] -= F[pu.phase_pos[Gas]];
}
+ if constexpr (Indices::enableSolvent) {
+ F_solvent = value_[SFrac];
+ F[pu.phase_pos[Water]] -= F_solvent;
+ }
}
else if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
F[pu.phase_pos[Gas]] = 1.0;
}
- [[maybe_unused]] double F_solvent;
- if constexpr (Indices::enableSolvent) {
- F_solvent = value_[SFrac];
- F[pu.phase_pos[Oil]] -= F_solvent;
- }
-
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
if (F[pu.phase_pos[Water]] < 0.0) {
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
@@ -732,6 +728,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,2u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,2u,0u,false,false,0u,2u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
// Blackoil
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
INSTANCE(BlackOilIndices<1u,0u,0u,0u,false,false,0u,0u>)
diff --git a/opm/simulators/wells/StandardWellPrimaryVariables.hpp b/opm/simulators/wells/StandardWellPrimaryVariables.hpp
index 05e3b04d5..31951536e 100644
--- a/opm/simulators/wells/StandardWellPrimaryVariables.hpp
+++ b/opm/simulators/wells/StandardWellPrimaryVariables.hpp
@@ -80,7 +80,7 @@ public:
static constexpr bool has_gfrac_variable = Indices::gasEnabled && Indices::numPhases > 1;
static constexpr int WFrac = has_wfrac_variable ? 1 : -1000;
static constexpr int GFrac = has_gfrac_variable ? has_wfrac_variable + 1 : -1000;
- static constexpr int SFrac = !Indices::enableSolvent ? -1000 : 3;
+ static constexpr int SFrac = !Indices::enableSolvent ? -1000 : has_wfrac_variable+has_gfrac_variable+1;
//! \brief Evaluation for the well equations.
using EvalWell = DenseAd::DynamicEvaluation;
diff --git a/opm/simulators/wells/WellInterfaceIndices.cpp b/opm/simulators/wells/WellInterfaceIndices.cpp
index 49df0e7ab..04d36404c 100644
--- a/opm/simulators/wells/WellInterfaceIndices.cpp
+++ b/opm/simulators/wells/WellInterfaceIndices.cpp
@@ -132,6 +132,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,1u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>)
INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>)
+INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>)
// Blackoil
INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>)
diff --git a/regressionTests.cmake b/regressionTests.cmake
index aaa0e3330..3b490fc70 100644
--- a/regressionTests.cmake
+++ b/regressionTests.cmake
@@ -814,6 +814,13 @@ add_test_compareECLFiles(CASENAME spe1_solvent_foam
REL_TOL ${rel_tol}
DIR spe1_solvent)
+add_test_compareECLFiles(CASENAME spe1_gaswater_solvent
+ FILENAME SPE1CASE2_GASWATER_SOLVENT
+ SIMULATOR flow
+ ABS_TOL ${abs_tol}
+ REL_TOL ${rel_tol}
+ DIR spe1_solvent)
+
add_test_compareECLFiles(CASENAME bc_lab
FILENAME BC_LAB
SIMULATOR flow
diff --git a/tests/update_reference_data.sh b/tests/update_reference_data.sh
index e0f3fd21c..b821b4e1b 100755
--- a/tests/update_reference_data.sh
+++ b/tests/update_reference_data.sh
@@ -161,6 +161,7 @@ tests[udq_in_actionx]="flow udq_actionx UDQ_M3"
tests[udq_pyaction]="flow udq_actionx PYACTION_WCONPROD"
tests[spe1_foam]="flow spe1_foam SPE1FOAM"
tests[spe1_solvent_foam]="flow spe1_solvent SPE1CASE2_SOLVENT_FOAM"
+tests[spe1_gaswater_solvent]="flow spe1_solvent SPE1CASE2_GASWATER_SOLVENT"
tests[wsegsicd]="flow wsegsicd TEST_WSEGSICD"
tests[wsegaicd]="flow wsegaicd BASE_MSW_WSEGAICD"
tests[wsegvalv]="flow wsegvalv BASE_MSW_WSEGVALV"