From bc50266489a35c9c3d2c5db889bfd4267fdf371b Mon Sep 17 00:00:00 2001 From: hnil Date: Thu, 21 Mar 2024 20:03:22 +0100 Subject: [PATCH 1/3] changes to compile compositional with flowproblem --- opm/models/ptflash/flashindices.hh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/opm/models/ptflash/flashindices.hh b/opm/models/ptflash/flashindices.hh index 6fc33bcbc..dd79f116c 100644 --- a/opm/models/ptflash/flashindices.hh +++ b/opm/models/ptflash/flashindices.hh @@ -50,6 +50,15 @@ class FlashIndices using EnergyIndices = Opm::EnergyIndices; public: + static constexpr bool waterEnabled = false; + static constexpr bool gasEnabled = true; + static constexpr bool oilEnabled = true; + static constexpr bool waterPhaseIdx = -1; + static constexpr bool waterGasIdx = 0; + static constexpr bool waterOilIdx = 1; + static constexpr bool compositionSwitchIdx = -1; + static constexpr bool numPhases = 3; + unsigned canonicalToActiveComponentIndex(unsigned solventCompIdx){return solventCompIdx;}; //! number of equations/primary variables static const int numEq = numComponents + EnergyIndices::numEq_; @@ -60,7 +69,7 @@ public: //! Index of the molefraction of the first component static constexpr int z0Idx = pressure0Idx + 1; - + // equation indices //! Index of the mass conservation equation for the first From 44c8aadcbecc9acc4e704a6dd55c6532948b4819 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Fri, 24 May 2024 16:33:45 +0200 Subject: [PATCH 2/3] adding the .hh files from the ptflash folder --- CMakeLists_files.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index e952d5baa..fd86cef75 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -214,13 +214,13 @@ list (APPEND PUBLIC_HEADER_FILES opm/models/parallel/gridcommhandles.hh opm/models/parallel/mpibuffer.hh opm/models/parallel/threadedentityiterator.hh - opm/models/ptflash/flashintensivequantities.hh opm/models/ptflash/flashindices.hh + opm/models/ptflash/flashintensivequantities.hh opm/models/ptflash/flashlocalresidual.hh opm/models/ptflash/flashmodel.hh opm/models/ptflash/flashnewtonmethod.hh - opm/models/ptflash/flashparameters.hh opm/models/ptflash/flashprimaryvariables.hh + opm/models/ptflash/flashproperties.hh opm/models/pvs/pvsboundaryratevector.hh opm/models/pvs/pvsratevector.hh opm/models/pvs/pvsindices.hh From 631c4b31d540a995fd0e185c785811114a9914e0 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Mon, 29 Jul 2024 15:02:12 +0200 Subject: [PATCH 3/3] revise a little --- opm/models/ptflash/flashindices.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/opm/models/ptflash/flashindices.hh b/opm/models/ptflash/flashindices.hh index dd79f116c..dfd1369af 100644 --- a/opm/models/ptflash/flashindices.hh +++ b/opm/models/ptflash/flashindices.hh @@ -40,6 +40,7 @@ namespace Opm { * * \tparam PVOffset The first index in a primary variable vector. */ + // TODO: The indices class should handle whether phase is active, not the FluidSystem template class FlashIndices : public EnergyIndices(), @@ -53,11 +54,11 @@ public: static constexpr bool waterEnabled = false; static constexpr bool gasEnabled = true; static constexpr bool oilEnabled = true; - static constexpr bool waterPhaseIdx = -1; - static constexpr bool waterGasIdx = 0; - static constexpr bool waterOilIdx = 1; - static constexpr bool compositionSwitchIdx = -1; - static constexpr bool numPhases = 3; + static constexpr int waterPhaseIdx = -1; + // static constexpr int waterGasIdx = 0; + // static constexpr int waterOilIdx = 1; + static constexpr int compositionSwitchIdx = -1; + static constexpr int numPhases = 2; unsigned canonicalToActiveComponentIndex(unsigned solventCompIdx){return solventCompIdx;}; //! number of equations/primary variables static const int numEq = numComponents + EnergyIndices::numEq_;