mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-11 08:51:55 -06:00
Add WCD, GCDI, GCDM, WIPG, WIPL summary for F and R
This commit is contained in:
parent
49cca2ea62
commit
d679ecd5a8
@ -70,6 +70,11 @@ std::string EclString(Opm::Inplace::Phase phase) {
|
|||||||
case Opm::Inplace::Phase::OilResVolume: return "OIPR";
|
case Opm::Inplace::Phase::OilResVolume: return "OIPR";
|
||||||
case Opm::Inplace::Phase::GasResVolume: return "GIPR";
|
case Opm::Inplace::Phase::GasResVolume: return "GIPR";
|
||||||
case Opm::Inplace::Phase::SALT: return "SIP";
|
case Opm::Inplace::Phase::SALT: return "SIP";
|
||||||
|
case Opm::Inplace::Phase::CO2InWaterPhase: return "WCD";
|
||||||
|
case Opm::Inplace::Phase::CO2InGasPhaseInMob: return "GCDI";
|
||||||
|
case Opm::Inplace::Phase::CO2InGasPhaseMob: return "GCDM";
|
||||||
|
case Opm::Inplace::Phase::WaterInGasPhase: return "WIPG";
|
||||||
|
case Opm::Inplace::Phase::WaterInWaterPhase: return "WIPL";
|
||||||
default: throw std::logic_error(fmt::format("Phase enum with integer value: {} not recognized", static_cast<int>(phase)));
|
default: throw std::logic_error(fmt::format("Phase enum with integer value: {} not recognized", static_cast<int>(phase)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1285,6 +1290,11 @@ fipUnitConvert_(std::unordered_map<Inplace::Phase, Scalar>& fip) const
|
|||||||
{Inplace::Phase::OilResVolume, M::volume},
|
{Inplace::Phase::OilResVolume, M::volume},
|
||||||
{Inplace::Phase::GasResVolume, M::volume},
|
{Inplace::Phase::GasResVolume, M::volume},
|
||||||
{Inplace::Phase::SALT, M::mass},
|
{Inplace::Phase::SALT, M::mass},
|
||||||
|
{Inplace::Phase::CO2InWaterPhase, M::gas_surface_volume},
|
||||||
|
{Inplace::Phase::CO2InGasPhaseInMob,M::gas_surface_volume},
|
||||||
|
{Inplace::Phase::CO2InGasPhaseMob, M::gas_surface_volume},
|
||||||
|
{Inplace::Phase::WaterInWaterPhase, M::liquid_surface_volume},
|
||||||
|
{Inplace::Phase::WaterInGasPhase, M::liquid_surface_volume},
|
||||||
};
|
};
|
||||||
|
|
||||||
for (auto& [phase, value] : fip) {
|
for (auto& [phase, value] : fip) {
|
||||||
|
@ -1032,6 +1032,7 @@ private:
|
|||||||
if (this->computeFip_) {
|
if (this->computeFip_) {
|
||||||
Scalar fip[FluidSystem::numPhases];
|
Scalar fip[FluidSystem::numPhases];
|
||||||
Scalar fipr[FluidSystem::numPhases]; // at reservoir condition
|
Scalar fipr[FluidSystem::numPhases]; // at reservoir condition
|
||||||
|
|
||||||
for (unsigned phaseIdx = 0; phaseIdx < FluidSystem::numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < FluidSystem::numPhases; ++phaseIdx) {
|
||||||
fip[phaseIdx] = 0.0;
|
fip[phaseIdx] = 0.0;
|
||||||
|
|
||||||
@ -1077,12 +1078,52 @@ private:
|
|||||||
if (!this->fip_[Inplace::Phase::OilInGasPhase].empty())
|
if (!this->fip_[Inplace::Phase::OilInGasPhase].empty())
|
||||||
this->fip_[Inplace::Phase::OilInGasPhase][globalDofIdx] = oilInPlaceGas;
|
this->fip_[Inplace::Phase::OilInGasPhase][globalDofIdx] = oilInPlaceGas;
|
||||||
|
|
||||||
|
// CO2STORE OIL + GAS
|
||||||
|
if (!this->fip_[Inplace::Phase::CO2InWaterPhase].empty())
|
||||||
|
this->fip_[Inplace::Phase::CO2InWaterPhase][globalDofIdx] = gasInPlaceLiquid;
|
||||||
|
|
||||||
// Add dissolved gas and vaporized oil to total Fip
|
// Add dissolved gas and vaporized oil to total Fip
|
||||||
if (!this->fip_[Inplace::Phase::OIL].empty())
|
if (!this->fip_[Inplace::Phase::OIL].empty())
|
||||||
this->fip_[Inplace::Phase::OIL][globalDofIdx] += oilInPlaceGas;
|
this->fip_[Inplace::Phase::OIL][globalDofIdx] += oilInPlaceGas;
|
||||||
if (!this->fip_[Inplace::Phase::GAS].empty())
|
if (!this->fip_[Inplace::Phase::GAS].empty())
|
||||||
this->fip_[Inplace::Phase::GAS][globalDofIdx] += gasInPlaceLiquid;
|
this->fip_[Inplace::Phase::GAS][globalDofIdx] += gasInPlaceLiquid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FluidSystem::phaseIsActive(waterPhaseIdx) && FluidSystem::phaseIsActive(gasPhaseIdx)) {
|
||||||
|
// Gas dissolved in water and vaporized water
|
||||||
|
Scalar gasInPlaceWater = getValue(fs.Rsw()) * fip[waterPhaseIdx];
|
||||||
|
Scalar waterInPlaceGas = getValue(fs.Rvw()) * fip[gasPhaseIdx];
|
||||||
|
|
||||||
|
if (!this->fip_[Inplace::Phase::CO2InWaterPhase].empty())
|
||||||
|
this->fip_[Inplace::Phase::CO2InWaterPhase][globalDofIdx] = gasInPlaceWater;
|
||||||
|
|
||||||
|
if (!this->fip_[Inplace::Phase::WaterInGasPhase].empty())
|
||||||
|
this->fip_[Inplace::Phase::WaterInGasPhase][globalDofIdx] = waterInPlaceGas;
|
||||||
|
|
||||||
|
if (!this->fip_[Inplace::Phase::WaterInWaterPhase].empty())
|
||||||
|
this->fip_[Inplace::Phase::WaterInWaterPhase][globalDofIdx] = fip[waterPhaseIdx];
|
||||||
|
|
||||||
|
// Add dissolved gas and vaporized water to total Fip
|
||||||
|
if (!this->fip_[Inplace::Phase::WATER].empty())
|
||||||
|
this->fip_[Inplace::Phase::WATER][globalDofIdx] += waterInPlaceGas;
|
||||||
|
if (!this->fip_[Inplace::Phase::GAS].empty())
|
||||||
|
this->fip_[Inplace::Phase::GAS][globalDofIdx] += gasInPlaceWater;
|
||||||
|
}
|
||||||
|
const auto& scaledDrainageInfo
|
||||||
|
= simulator_.problem().materialLawManager()->oilWaterScaledEpsInfoDrainage(globalDofIdx);
|
||||||
|
const Scalar& sgcr = scaledDrainageInfo.Sgcr;
|
||||||
|
if (FluidSystem::phaseIsActive(gasPhaseIdx) && !this->fip_[Inplace::Phase::CO2InGasPhaseInMob].empty()) {
|
||||||
|
const double bg = getValue(fs.invB(gasPhaseIdx));
|
||||||
|
const double sg = getValue(fs.saturation(gasPhaseIdx));
|
||||||
|
Scalar imMobileGas = pv * bg * std::min(sgcr , sg);
|
||||||
|
this->fip_[Inplace::Phase::CO2InGasPhaseInMob][globalDofIdx] = imMobileGas;
|
||||||
|
}
|
||||||
|
if (FluidSystem::phaseIsActive(gasPhaseIdx) && !this->fip_[Inplace::Phase::CO2InGasPhaseMob].empty()) {
|
||||||
|
const double bg = getValue(fs.invB(gasPhaseIdx));
|
||||||
|
const double sg = getValue(fs.saturation(gasPhaseIdx));
|
||||||
|
Scalar mobileGas = pv * bg * std::max(0.0, sg - sgcr);
|
||||||
|
this->fip_[Inplace::Phase::CO2InGasPhaseMob][globalDofIdx] = mobileGas;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user