mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
OutputBlackoilModule: move updateInplaceVolumesReservoir to FIPContainer
This commit is contained in:
@@ -221,6 +221,39 @@ assignVolumesSurface(const unsigned globalDofIdx,
|
||||
}
|
||||
}
|
||||
|
||||
template<class FluidSystem>
|
||||
void
|
||||
FIPContainer<FluidSystem>::
|
||||
assignVolumesReservoir(const unsigned globalDofIdx,
|
||||
const Scalar saltConcentration,
|
||||
const std::array<Scalar, numPhases>& fipr)
|
||||
{
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::OilResVolume].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::OilResVolume][globalDofIdx] = fipr[oilPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(gasPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::GasResVolume].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::GasResVolume][globalDofIdx] = fipr[gasPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::WaterResVolume].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::WaterResVolume][globalDofIdx] = fipr[waterPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::SALT].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::SALT][globalDofIdx] =
|
||||
fipr[waterPhaseIdx] * saltConcentration;
|
||||
}
|
||||
}
|
||||
|
||||
template<class T> using FS = BlackOilFluidSystem<T,BlackOilDefaultIndexTraits>;
|
||||
|
||||
#define INSTANTIATE_TYPE(T) \
|
||||
|
||||
@@ -81,6 +81,10 @@ public:
|
||||
void assignVolumesSurface(const unsigned globalDofIdx,
|
||||
const std::array<Scalar, numPhases>& fip);
|
||||
|
||||
void assignVolumesReservoir(const unsigned globalDofIdx,
|
||||
const Scalar saltConcentration,
|
||||
const std::array<Scalar, numPhases>& fipr);
|
||||
|
||||
private:
|
||||
FIPMap& fip_;
|
||||
std::size_t bufferSize_ = 0;
|
||||
|
||||
@@ -1484,7 +1484,9 @@ private:
|
||||
}
|
||||
|
||||
this->fipC_.assignVolumesSurface(globalDofIdx, fip);
|
||||
this->updateInplaceVolumesReservoir(globalDofIdx, fs, fipr);
|
||||
this->fipC_.assignVolumesReservoir(globalDofIdx,
|
||||
fs.saltConcentration().value(),
|
||||
fipr);
|
||||
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx) &&
|
||||
FluidSystem::phaseIsActive(gasPhaseIdx))
|
||||
@@ -1527,37 +1529,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
template <typename FluidState, typename FIPArray>
|
||||
void updateInplaceVolumesReservoir(const unsigned globalDofIdx,
|
||||
const FluidState& fs,
|
||||
const FIPArray& fipr)
|
||||
{
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::OilResVolume].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::OilResVolume][globalDofIdx] = fipr[oilPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(gasPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::GasResVolume].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::GasResVolume][globalDofIdx] = fipr[gasPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::WaterResVolume].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::WaterResVolume][globalDofIdx] = fipr[waterPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::SALT].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::SALT][globalDofIdx] =
|
||||
fipr[waterPhaseIdx] * fs.saltConcentration().value();
|
||||
}
|
||||
}
|
||||
|
||||
template <typename FluidState, typename FIPArray>
|
||||
void updateOilGasDistribution(const unsigned globalDofIdx,
|
||||
const FluidState& fs,
|
||||
|
||||
Reference in New Issue
Block a user