mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move assignment of OilGasDistribution fip values into FIPContainer
This commit is contained in:
parent
be86ef16c5
commit
58c1a16299
@ -254,6 +254,31 @@ assignVolumesReservoir(const unsigned globalDofIdx,
|
||||
}
|
||||
}
|
||||
|
||||
template<class FluidSystem>
|
||||
void
|
||||
FIPContainer<FluidSystem>::
|
||||
assignOilGasDistribution(const unsigned globalDofIdx,
|
||||
const Scalar gasInPlaceLiquid,
|
||||
const Scalar oilInPlaceGas)
|
||||
{
|
||||
if (!this->fip_[Inplace::Phase::GasInLiquidPhase].empty()) {
|
||||
this->fip_[Inplace::Phase::GasInLiquidPhase][globalDofIdx] = gasInPlaceLiquid;
|
||||
}
|
||||
|
||||
if (!this->fip_[Inplace::Phase::OilInGasPhase].empty()) {
|
||||
this->fip_[Inplace::Phase::OilInGasPhase][globalDofIdx] = oilInPlaceGas;
|
||||
}
|
||||
|
||||
// Add dissolved gas and vaporized oil to total Fip
|
||||
if (!this->fip_[Inplace::Phase::OIL].empty()) {
|
||||
this->fip_[Inplace::Phase::OIL][globalDofIdx] += oilInPlaceGas;
|
||||
}
|
||||
|
||||
if (!this->fip_[Inplace::Phase::GAS].empty()) {
|
||||
this->fip_[Inplace::Phase::GAS][globalDofIdx] += gasInPlaceLiquid;
|
||||
}
|
||||
}
|
||||
|
||||
template<class T> using FS = BlackOilFluidSystem<T,BlackOilDefaultIndexTraits>;
|
||||
|
||||
#define INSTANTIATE_TYPE(T) \
|
||||
|
@ -78,6 +78,10 @@ public:
|
||||
const Scalar gasInPlaceWater,
|
||||
const Scalar waterInPlaceGas);
|
||||
|
||||
void assignOilGasDistribution(const unsigned globalDofIdx,
|
||||
const Scalar gasInPlaceLiquid,
|
||||
const Scalar oilInPlaceGas);
|
||||
|
||||
void assignVolumesSurface(const unsigned globalDofIdx,
|
||||
const std::array<Scalar, numPhases>& fip);
|
||||
|
||||
|
@ -1538,22 +1538,7 @@ private:
|
||||
const auto gasInPlaceLiquid = getValue(fs.Rs()) * fip[oilPhaseIdx];
|
||||
const auto oilInPlaceGas = getValue(fs.Rv()) * fip[gasPhaseIdx];
|
||||
|
||||
if (!this->fip_[Inplace::Phase::GasInLiquidPhase].empty()) {
|
||||
this->fip_[Inplace::Phase::GasInLiquidPhase][globalDofIdx] = gasInPlaceLiquid;
|
||||
}
|
||||
|
||||
if (!this->fip_[Inplace::Phase::OilInGasPhase].empty()) {
|
||||
this->fip_[Inplace::Phase::OilInGasPhase][globalDofIdx] = oilInPlaceGas;
|
||||
}
|
||||
|
||||
// Add dissolved gas and vaporized oil to total Fip
|
||||
if (!this->fip_[Inplace::Phase::OIL].empty()) {
|
||||
this->fip_[Inplace::Phase::OIL][globalDofIdx] += oilInPlaceGas;
|
||||
}
|
||||
|
||||
if (!this->fip_[Inplace::Phase::GAS].empty()) {
|
||||
this->fip_[Inplace::Phase::GAS][globalDofIdx] += gasInPlaceLiquid;
|
||||
}
|
||||
this->fipC_.assignOilGasDistribution(globalDofIdx, gasInPlaceLiquid, oilInPlaceGas);
|
||||
}
|
||||
|
||||
template <typename FluidState, typename FIPArray>
|
||||
|
Loading…
Reference in New Issue
Block a user