mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
FIPContainer: add query function for phase presence
This commit is contained in:
parent
57ef2b63e8
commit
f816995329
@ -82,6 +82,15 @@ FIPContainer<FluidSystem>::add(const Inplace::Phase phase)
|
||||
this->fip_[phase].resize(bufferSize_, 0.0);
|
||||
}
|
||||
|
||||
template<class FluidSystem>
|
||||
bool
|
||||
FIPContainer<FluidSystem>::
|
||||
has(const Inplace::Phase phase) const
|
||||
{
|
||||
const auto it = this->fip_.find(phase);
|
||||
return it != this->fip_.end() && !it->second.empty();
|
||||
}
|
||||
|
||||
template<class FluidSystem>
|
||||
void
|
||||
FIPContainer<FluidSystem>::
|
||||
|
@ -77,6 +77,8 @@ public:
|
||||
Scalar strandedGas;
|
||||
};
|
||||
|
||||
bool has(const Inplace::Phase phase) const;
|
||||
|
||||
void assignCo2InGas(const unsigned globalDofIdx,
|
||||
const Co2InGasInput& v);
|
||||
|
||||
|
@ -1569,8 +1569,9 @@ private:
|
||||
}
|
||||
|
||||
Scalar trappedGasSaturation = scaledDrainageInfo.Sgcr;
|
||||
if (!this->fip_[Inplace::Phase::CO2MassInGasPhaseMaximumTrapped].empty() ||
|
||||
!this->fip_[Inplace::Phase::CO2MassInGasPhaseMaximumUnTrapped].empty() ) {
|
||||
if (this->fipC_.has(Inplace::Phase::CO2MassInGasPhaseMaximumTrapped) ||
|
||||
this->fipC_.has(Inplace::Phase::CO2MassInGasPhaseMaximumUnTrapped))
|
||||
{
|
||||
if (this->simulator_.problem().materialLawManager()->enableHysteresis()) {
|
||||
const auto& matParams = simulator_.problem().materialLawParams(globalDofIdx);
|
||||
// Get the maximum trapped gas saturation
|
||||
@ -1580,8 +1581,8 @@ private:
|
||||
|
||||
const Scalar sg = getValue(fs.saturation(gasPhaseIdx));
|
||||
Scalar strandedGasSaturation = scaledDrainageInfo.Sgcr;
|
||||
if (!this->fip_[Inplace::Phase::CO2MassInGasPhaseEffectiveTrapped].empty() ||
|
||||
!this->fip_[Inplace::Phase::CO2MassInGasPhaseEffectiveUnTrapped].empty())
|
||||
if (this->fipC_.has(Inplace::Phase::CO2MassInGasPhaseEffectiveTrapped) ||
|
||||
this->fipC_.has(Inplace::Phase::CO2MassInGasPhaseEffectiveUnTrapped))
|
||||
{
|
||||
if (this->simulator_.problem().materialLawManager()->enableHysteresis()) {
|
||||
const auto& matParams = simulator_.problem().materialLawParams(globalDofIdx);
|
||||
|
Loading…
Reference in New Issue
Block a user