diff --git a/opm/simulators/flow/GenericOutputBlackoilModule.cpp b/opm/simulators/flow/GenericOutputBlackoilModule.cpp index 43b5583e2..8acce5c5b 100644 --- a/opm/simulators/flow/GenericOutputBlackoilModule.cpp +++ b/opm/simulators/flow/GenericOutputBlackoilModule.cpp @@ -106,6 +106,12 @@ std::string EclString(const Opm::Inplace::Phase phase) case Opm::Inplace::Phase::CO2InGasPhaseMob: return "GCDM"; + case Opm::Inplace::Phase::CO2InGasPhaseInMobKrg: + return "GKDI"; + + case Opm::Inplace::Phase::CO2InGasPhaseMobKrg: + return "GKDM"; + case Opm::Inplace::Phase::WaterInGasPhase: return "WIPG"; @@ -127,6 +133,12 @@ std::string EclString(const Opm::Inplace::Phase phase) case Opm::Inplace::Phase::CO2MassInGasPhaseMob: return "GMMO"; + case Opm::Inplace::Phase::CO2MassInGasPhaseInMobKrg: + return "GKTR"; + + case Opm::Inplace::Phase::CO2MassInGasPhaseMobKrg: + return "GKMO"; + default: throw std::logic_error { fmt::format("Phase enum with integer value: " diff --git a/opm/simulators/flow/LogOutputHelper.cpp b/opm/simulators/flow/LogOutputHelper.cpp index 086838a6e..a1a91ae29 100644 --- a/opm/simulators/flow/LogOutputHelper.cpp +++ b/opm/simulators/flow/LogOutputHelper.cpp @@ -948,29 +948,33 @@ fipUnitConvert_(std::unordered_map& fip) const const UnitSystem& units = eclState_.getUnits(); using M = UnitSystem::measure; const auto unit_map = std::unordered_map { - {Inplace::Phase::WATER, M::liquid_surface_volume}, - {Inplace::Phase::OIL, M::liquid_surface_volume}, - {Inplace::Phase::OilInLiquidPhase, M::liquid_surface_volume}, - {Inplace::Phase::OilInGasPhase, M::liquid_surface_volume}, - {Inplace::Phase::GAS, M::gas_surface_volume}, - {Inplace::Phase::GasInLiquidPhase, M::gas_surface_volume}, - {Inplace::Phase::GasInGasPhase, M::gas_surface_volume}, - {Inplace::Phase::PoreVolume, M::volume}, - {Inplace::Phase::DynamicPoreVolume, M::volume}, - {Inplace::Phase::WaterResVolume, M::volume}, - {Inplace::Phase::OilResVolume, M::volume}, - {Inplace::Phase::GasResVolume, M::volume}, - {Inplace::Phase::SALT, M::mass}, - {Inplace::Phase::CO2InWaterPhase, M::moles}, - {Inplace::Phase::CO2InGasPhaseInMob, M::moles}, - {Inplace::Phase::CO2InGasPhaseMob, M::moles}, - {Inplace::Phase::WaterInWaterPhase, M::liquid_surface_volume}, - {Inplace::Phase::WaterInGasPhase, M::liquid_surface_volume}, - {Inplace::Phase::CO2Mass, M::mass}, - {Inplace::Phase::CO2MassInWaterPhase, M::mass}, - {Inplace::Phase::CO2MassInGasPhase, M::mass}, - {Inplace::Phase::CO2MassInGasPhaseInMob, M::mass}, - {Inplace::Phase::CO2MassInGasPhaseMob, M::mass}, + {Inplace::Phase::WATER, M::liquid_surface_volume}, + {Inplace::Phase::OIL, M::liquid_surface_volume}, + {Inplace::Phase::OilInLiquidPhase, M::liquid_surface_volume}, + {Inplace::Phase::OilInGasPhase, M::liquid_surface_volume}, + {Inplace::Phase::GAS, M::gas_surface_volume}, + {Inplace::Phase::GasInLiquidPhase, M::gas_surface_volume}, + {Inplace::Phase::GasInGasPhase, M::gas_surface_volume}, + {Inplace::Phase::PoreVolume, M::volume}, + {Inplace::Phase::DynamicPoreVolume, M::volume}, + {Inplace::Phase::WaterResVolume, M::volume}, + {Inplace::Phase::OilResVolume, M::volume}, + {Inplace::Phase::GasResVolume, M::volume}, + {Inplace::Phase::SALT, M::mass}, + {Inplace::Phase::CO2InWaterPhase, M::moles}, + {Inplace::Phase::CO2InGasPhaseInMob, M::moles}, + {Inplace::Phase::CO2InGasPhaseMob, M::moles}, + {Inplace::Phase::CO2InGasPhaseInMobKrg, M::moles}, + {Inplace::Phase::CO2InGasPhaseMobKrg, M::moles}, + {Inplace::Phase::WaterInWaterPhase, M::liquid_surface_volume}, + {Inplace::Phase::WaterInGasPhase, M::liquid_surface_volume}, + {Inplace::Phase::CO2Mass, M::mass}, + {Inplace::Phase::CO2MassInWaterPhase, M::mass}, + {Inplace::Phase::CO2MassInGasPhase, M::mass}, + {Inplace::Phase::CO2MassInGasPhaseInMob, M::mass}, + {Inplace::Phase::CO2MassInGasPhaseMob, M::mass}, + {Inplace::Phase::CO2MassInGasPhaseInMobKrg, M::mass}, + {Inplace::Phase::CO2MassInGasPhaseMobKrg, M::mass}, }; for (auto& [phase, value] : fip) { diff --git a/opm/simulators/flow/OutputBlackoilModule.hpp b/opm/simulators/flow/OutputBlackoilModule.hpp index bfbef470c..ef344328d 100644 --- a/opm/simulators/flow/OutputBlackoilModule.hpp +++ b/opm/simulators/flow/OutputBlackoilModule.hpp @@ -1441,7 +1441,11 @@ private: !this->fip_[Inplace::Phase::CO2InGasPhaseMob].empty() || !this->fip_[Inplace::Phase::CO2MassInGasPhaseInMob].empty() || !this->fip_[Inplace::Phase::CO2MassInGasPhaseMob].empty() || - !this->fip_[Inplace::Phase::CO2Mass].empty())) + !this->fip_[Inplace::Phase::CO2Mass].empty() || + !this->fip_[Inplace::Phase::CO2InGasPhaseInMobKrg].empty() || + !this->fip_[Inplace::Phase::CO2InGasPhaseMobKrg].empty() || + !this->fip_[Inplace::Phase::CO2MassInGasPhaseInMobKrg].empty() || + !this->fip_[Inplace::Phase::CO2MassInGasPhaseMobKrg].empty())) { this->updateCO2InGas(globalDofIdx, pv, fs); } @@ -1619,6 +1623,24 @@ private: this->fip_[Inplace::Phase::CO2InGasPhaseMob][globalDofIdx] = mobileGas; } + if (!this->fip_[Inplace::Phase::CO2InGasPhaseInMobKrg].empty()) { + if (sgcr >= sg) { + const Scalar imMobileGasKrg = massGas / mM * sg; + this->fip_[Inplace::Phase::CO2InGasPhaseInMobKrg][globalDofIdx] = imMobileGasKrg; + } else { + this->fip_[Inplace::Phase::CO2InGasPhaseInMobKrg][globalDofIdx] = 0; + } + } + + if (!this->fip_[Inplace::Phase::CO2InGasPhaseMobKrg].empty()) { + if (sg > sgcr) { + const Scalar mobileGasKrg = massGas / mM * sg; + this->fip_[Inplace::Phase::CO2InGasPhaseMobKrg][globalDofIdx] = mobileGasKrg; + } else { + this->fip_[Inplace::Phase::CO2InGasPhaseMobKrg][globalDofIdx] = 0; + } + } + if (!this->fip_[Inplace::Phase::CO2MassInGasPhaseInMob].empty()) { const Scalar imMobileMassGas = massGas * std::min(sgcr , sg); this->fip_[Inplace::Phase::CO2MassInGasPhaseInMob][globalDofIdx] = imMobileMassGas; @@ -1628,6 +1650,24 @@ private: const Scalar mobileMassGas = massGas * std::max(0.0, sg - sgcr); this->fip_[Inplace::Phase::CO2MassInGasPhaseMob][globalDofIdx] = mobileMassGas; } + + if (!this->fip_[Inplace::Phase::CO2MassInGasPhaseInMobKrg].empty()) { + if (sgcr >= sg) { + const Scalar imMobileMassGasKrg = massGas * sg; + this->fip_[Inplace::Phase::CO2MassInGasPhaseInMobKrg][globalDofIdx] = imMobileMassGasKrg; + } else { + this->fip_[Inplace::Phase::CO2MassInGasPhaseInMobKrg][globalDofIdx] = 0; + } + } + + if (!this->fip_[Inplace::Phase::CO2MassInGasPhaseMobKrg].empty()) { + if (sg > sgcr) { + const Scalar mobileMassGasKrg = massGas * sg; + this->fip_[Inplace::Phase::CO2MassInGasPhaseMobKrg][globalDofIdx] = mobileMassGasKrg; + } else { + this->fip_[Inplace::Phase::CO2MassInGasPhaseMobKrg][globalDofIdx] = 0; + } + } } template diff --git a/opm/simulators/utils/initDamarisXmlFile.cpp b/opm/simulators/utils/initDamarisXmlFile.cpp index 58bac7767..aa53e7cc0 100644 --- a/opm/simulators/utils/initDamarisXmlFile.cpp +++ b/opm/simulators/utils/initDamarisXmlFile.cpp @@ -87,6 +87,15 @@ std::string initDamarisXmlFile() + + + + + + + + +