From 9e504da6a11f548da02718190b8157885a8c1680 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Wed, 3 May 2017 10:54:06 +0200 Subject: [PATCH] Add solvent to phaseUsage --- opm/core/props/BlackoilPhases.hpp | 1 + opm/core/props/phaseUsageFromDeck.hpp | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/opm/core/props/BlackoilPhases.hpp b/opm/core/props/BlackoilPhases.hpp index 981588ff7..58c6cbec3 100644 --- a/opm/core/props/BlackoilPhases.hpp +++ b/opm/core/props/BlackoilPhases.hpp @@ -38,6 +38,7 @@ namespace Opm int num_phases; int phase_used[MaxNumPhases]; int phase_pos[MaxNumPhases]; + bool has_solvent; }; /// Check or assign presence of a formed, free phase. Limited to diff --git a/opm/core/props/phaseUsageFromDeck.hpp b/opm/core/props/phaseUsageFromDeck.hpp index 18b42ea04..69cb743e2 100644 --- a/opm/core/props/phaseUsageFromDeck.hpp +++ b/opm/core/props/phaseUsageFromDeck.hpp @@ -66,6 +66,12 @@ namespace Opm OPM_THROW(std::runtime_error, "Cannot handle cases with no OIL, i.e. water-gas systems."); } + // Add solvent info + pu.has_solvent = false; + if (phase.active(Phase::SOLVENT)) { + pu.has_solvent = true; + } + return pu; } @@ -112,6 +118,12 @@ namespace Opm OPM_THROW(std::runtime_error, "Cannot handle cases with no OIL, i.e. water-gas systems."); } + // Add solvent info + pu.has_solvent = false; + if (phase.active(Phase::SOLVENT)) { + pu.has_solvent = true; + } + return pu; }