diff --git a/opm/material/fluidsystems/chifluid/twophasefluidsystem.hh b/opm/material/fluidsystems/chifluid/twophasefluidsystem.hh index 0e56cdb4c..aafb176e1 100644 --- a/opm/material/fluidsystems/chifluid/twophasefluidsystem.hh +++ b/opm/material/fluidsystems/chifluid/twophasefluidsystem.hh @@ -57,10 +57,10 @@ namespace Opm { * \brief A two-phase fluid system with three components */ template -class TwoPhaseThreeComponentFluidSystem - : public Opm::BaseFluidSystem > +class TwoPhaseTwoComponentFluidSystem + : public Opm::BaseFluidSystem > { - using ThisType = TwoPhaseThreeComponentFluidSystem; + using ThisType = TwoPhaseTwoComponentFluidSystem; using PengRobinsonMixture = typename Opm::PengRobinsonMixture; using LBCviscosity = typename Opm::LBCviscosity; @@ -123,56 +123,6 @@ public: using Comp0 = Opm::ChiwomsBrine; using Comp1 = Opm::ChiwomsCO2; - static void init(Scalar minT = 273.15, - Scalar maxT = 373.15, - Scalar minP = 1e4, - Scalar maxP = 100e6) - { - Opm::PengRobinsonParamsMixture prParams; - - // find envelopes of the 'a' and 'b' parameters for the range - // minT <= T <= maxT and minP <= p <= maxP. For - // this we take advantage of the fact that 'a' and 'b' for - // mixtures is just a convex combination of the attractive and - // repulsive parameters of the pure components - - Scalar minA = 1e30, maxA = -1e30; - Scalar minB = 1e30, maxB = -1e30; - - prParams.updatePure(minT, minP); - for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) { - minA = std::min(prParams.pureParams(compIdx).a(), minA); - maxA = std::max(prParams.pureParams(compIdx).a(), maxA); - minB = std::min(prParams.pureParams(compIdx).b(), minB); - maxB = std::max(prParams.pureParams(compIdx).b(), maxB); - }; - - prParams.updatePure(maxT, minP); - for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) { - minA = std::min(prParams.pureParams(compIdx).a(), minA); - maxA = std::max(prParams.pureParams(compIdx).a(), maxA); - minB = std::min(prParams.pureParams(compIdx).b(), minB); - maxB = std::max(prParams.pureParams(compIdx).b(), maxB); - }; - - prParams.updatePure(minT, maxP); - for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) { - minA = std::min(prParams.pureParams(compIdx).a(), minA); - maxA = std::max(prParams.pureParams(compIdx).a(), maxA); - minB = std::min(prParams.pureParams(compIdx).b(), minB); - maxB = std::max(prParams.pureParams(compIdx).b(), maxB); - }; - - prParams.updatePure(maxT, maxP); - for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx) { - minA = std::min(prParams.pureParams(compIdx).a(), minA); - maxA = std::max(prParams.pureParams(compIdx).a(), maxA); - minB = std::min(prParams.pureParams(compIdx).b(), minB); - maxB = std::max(prParams.pureParams(compIdx).b(), maxB); - }; - // PengRobinson::init(/*aMin=*/minA, /*aMax=*/maxA, /*na=*/100, - // /*bMin=*/minB, /*bMax=*/maxB, /*nb=*/200); - } //! \copydoc BaseFluidSystem::componentName static const char* componentName(unsigned compIdx) diff --git a/tests/test_chiflash.cpp b/tests/test_chiflash.cpp index 3a2e2bda4..c1df4eab8 100644 --- a/tests/test_chiflash.cpp +++ b/tests/test_chiflash.cpp @@ -43,7 +43,7 @@ void testChiFlash() { using Scalar = double; - using FluidSystem = Opm::TwoPhaseThreeComponentFluidSystem; + using FluidSystem = Opm::TwoPhaseTwoComponentFluidSystem; constexpr auto numComponents = FluidSystem::numComponents; using Evaluation = Opm::DenseAd::Evaluation; diff --git a/tests/test_chiflash_scalar.cpp b/tests/test_chiflash_scalar.cpp index 0f131549a..0f04cc592 100644 --- a/tests/test_chiflash_scalar.cpp +++ b/tests/test_chiflash_scalar.cpp @@ -45,7 +45,7 @@ void testChiFlash() using Scalar = double; - using FluidSystem = Opm::TwoPhaseThreeComponentFluidSystem; + using FluidSystem = Opm::TwoPhaseTwoComponentFluidSystem; constexpr auto numComponents = FluidSystem::numComponents; //using Evaluation = Opm::DenseAd::Evaluation;