From b8032c12bb09764602f261027aa5b6ef624568e2 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Fri, 17 Mar 2023 11:41:33 +0100 Subject: [PATCH] add vapwat to gaswater simulators and output molfractions YMFWAT --- ebos/eclgenericoutputblackoilmodule.cc | 9 +++++++++ flow/flow_ebos_gaswater_dissolution.cpp | 5 +++++ flow/flow_ebos_gaswater_dissolution_diffuse.cpp | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/ebos/eclgenericoutputblackoilmodule.cc b/ebos/eclgenericoutputblackoilmodule.cc index 675bcd0a2..e8064a5e3 100644 --- a/ebos/eclgenericoutputblackoilmodule.cc +++ b/ebos/eclgenericoutputblackoilmodule.cc @@ -846,6 +846,15 @@ assignToSolution(data::Solution& sol) sol.insert("XMFCO2", UnitSystem::measure::identity, std::move(mfrac), data::TargetType::RESTART_AUXILIARY); } + if (eclState_.runspec().co2Storage() && !rvw_.empty()) { + std::vector mfrac(rvw_.size(), 0.0); + const auto& pvtnum = eclState_.fieldProps().get_int("PVTNUM"); + for (size_t i = 0; i < rvw_.size(); ++i) { + mfrac[i] = FluidSystem::convertXgWToxgW(FluidSystem::convertRvwToXgW(rvw_[i], pvtnum[i]-1), pvtnum[i]-1); + } + sol.insert("YMFWAT", UnitSystem::measure::identity, std::move(mfrac), data::TargetType::RESTART_AUXILIARY); + } + // Fluid in place if (this->outputFipRestart_) { for (const auto& phase : Inplace::phases()) { diff --git a/flow/flow_ebos_gaswater_dissolution.cpp b/flow/flow_ebos_gaswater_dissolution.cpp index e8e83ae63..afd078582 100644 --- a/flow/flow_ebos_gaswater_dissolution.cpp +++ b/flow/flow_ebos_gaswater_dissolution.cpp @@ -53,6 +53,11 @@ struct EnableDisgasInWater { static constexpr bool value = true; }; +template +struct EnableEvaporation { + static constexpr bool value = true; +}; + //! The indices required by the model template struct Indices diff --git a/flow/flow_ebos_gaswater_dissolution_diffuse.cpp b/flow/flow_ebos_gaswater_dissolution_diffuse.cpp index 95c8e4a9c..509c901f3 100644 --- a/flow/flow_ebos_gaswater_dissolution_diffuse.cpp +++ b/flow/flow_ebos_gaswater_dissolution_diffuse.cpp @@ -53,6 +53,11 @@ struct EnableDisgasInWater +struct EnableEvaporation { + static constexpr bool value = true; +}; + //! The indices required by the model template struct Indices