From daecfa7e55d62176b51932c2ab7fe03bef4ccfab Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Wed, 3 May 2017 10:54:06 +0200 Subject: [PATCH 1/2] 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 981588ff..58c6cbec 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 18b42ea0..69cb743e 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; } From dbe7930ef7d832b770578ebbec0ff26e211b3c26 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Wed, 10 May 2017 11:14:53 +0200 Subject: [PATCH 2/2] Add SSOL to blackoilState Stores the solvent saturation in the simulator container. --- opm/core/simulator/BlackoilState.cpp | 2 ++ opm/core/simulator/BlackoilState.hpp | 1 + 2 files changed, 3 insertions(+) diff --git a/opm/core/simulator/BlackoilState.cpp b/opm/core/simulator/BlackoilState.cpp index 02be96b8..225567c2 100644 --- a/opm/core/simulator/BlackoilState.cpp +++ b/opm/core/simulator/BlackoilState.cpp @@ -11,6 +11,7 @@ using namespace Opm; const std::string BlackoilState::GASOILRATIO = "GASOILRATIO"; const std::string BlackoilState::RV = "RV"; const std::string BlackoilState::SURFACEVOL = "SURFACEVOL"; +const std::string BlackoilState::SSOL = "SSOL"; BlackoilState::BlackoilState( size_t num_cells , size_t num_faces , size_t num_phases) @@ -19,6 +20,7 @@ BlackoilState::BlackoilState( size_t num_cells , size_t num_faces , size_t num_p registerCellData( GASOILRATIO , 1 ); registerCellData( RV, 1 ); registerCellData( SURFACEVOL, num_phases ); + registerCellData( SSOL , 1 ); setBlackoilStateReferencePointers(); } diff --git a/opm/core/simulator/BlackoilState.hpp b/opm/core/simulator/BlackoilState.hpp index fe6c0dbc..a5dc428a 100644 --- a/opm/core/simulator/BlackoilState.hpp +++ b/opm/core/simulator/BlackoilState.hpp @@ -43,6 +43,7 @@ namespace Opm static const std::string GASOILRATIO; static const std::string RV; static const std::string SURFACEVOL; + static const std::string SSOL; /// Main constructor setting the sizes for the contained data /// types.