From 7f1074291ce40f69c0d6f613892b0460d692ab72 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Thu, 21 May 2026 23:41:59 +0200 Subject: [PATCH 1/3] converting std::vector to std::vector for BIC coefficients in GenericOilGasWaterFluidSystem --- opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp b/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp index 7139cd5cb01..9b541e2dd5c 100644 --- a/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp +++ b/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp @@ -157,7 +157,8 @@ namespace Opm { critic_volume[c] * 1.e3, acentric_factor[c]}); } FluidSystem::printComponentParams(); - interaction_coefficients_ = comp_config.binaryInteractionCoefficient(0); + const auto& bic = comp_config.binaryInteractionCoefficient(0); + interaction_coefficients_.assign(bic.begin(), bic.end()); // Init. water pvt from deck waterPvt_->initFromState(eclState, schedule); From 577ae55fba91249c0713d31dd2ca40c9b92c9fb2 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Wed, 27 May 2026 09:37:36 +0200 Subject: [PATCH 2/3] removing the unhelpful FluidSystem::printComponentParams() --- opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp b/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp index 9b541e2dd5c..19ce09e3ec1 100644 --- a/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp +++ b/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp @@ -156,7 +156,6 @@ namespace Opm { FluidSystem::addComponent(CompParm{names[c], molar_weight[c], critic_temp[c], critic_pressure[c], critic_volume[c] * 1.e3, acentric_factor[c]}); } - FluidSystem::printComponentParams(); const auto& bic = comp_config.binaryInteractionCoefficient(0); interaction_coefficients_.assign(bic.begin(), bic.end()); From 2ffc30f0e46c1827333636d76c1ff93d0c020966 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Wed, 3 Jun 2026 15:32:34 +0200 Subject: [PATCH 3/3] addressing reviewing comments. --- .../fluidsystems/GenericOilGasWaterFluidSystem.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp b/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp index 19ce09e3ec1..dd21b216a7f 100644 --- a/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp +++ b/opm/material/fluidsystems/GenericOilGasWaterFluidSystem.hpp @@ -37,10 +37,12 @@ #include // TODO: this is something else need to check #include +#include #include #include #include #include +#include #include @@ -156,8 +158,14 @@ namespace Opm { FluidSystem::addComponent(CompParm{names[c], molar_weight[c], critic_temp[c], critic_pressure[c], critic_volume[c] * 1.e3, acentric_factor[c]}); } + const auto& bic = comp_config.binaryInteractionCoefficient(0); - interaction_coefficients_.assign(bic.begin(), bic.end()); + if constexpr (std::is_same_v) { + interaction_coefficients_ = bic; + } else { + interaction_coefficients_.resize(bic.size()); + std::ranges::copy(bic, interaction_coefficients_.begin()); + } // Init. water pvt from deck waterPvt_->initFromState(eclState, schedule);