mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move assignment of volumes into ExtboContainer
This commit is contained in:
parent
3aa252e8b2
commit
6024f10527
@ -48,6 +48,16 @@ allocate(const unsigned bufferSize)
|
|||||||
allocated_ = true;
|
allocated_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Scalar>
|
||||||
|
void ExtboContainer<Scalar>::
|
||||||
|
assignVolumes(const unsigned globalDofIdx,
|
||||||
|
const Scalar xVolume,
|
||||||
|
const Scalar yVolume)
|
||||||
|
{
|
||||||
|
X_volume_[globalDofIdx] = xVolume;
|
||||||
|
Y_volume_[globalDofIdx] = yVolume;
|
||||||
|
}
|
||||||
|
|
||||||
template<class Scalar>
|
template<class Scalar>
|
||||||
void ExtboContainer<Scalar>::
|
void ExtboContainer<Scalar>::
|
||||||
outputRestart(data::Solution& sol)
|
outputRestart(data::Solution& sol)
|
||||||
|
@ -40,6 +40,10 @@ class ExtboContainer
|
|||||||
public:
|
public:
|
||||||
void allocate(const unsigned bufferSize);
|
void allocate(const unsigned bufferSize);
|
||||||
|
|
||||||
|
void assignVolumes(const unsigned globalDofIdx,
|
||||||
|
const Scalar xVolume,
|
||||||
|
const Scalar yVolume);
|
||||||
|
|
||||||
void outputRestart(data::Solution& sol);
|
void outputRestart(data::Solution& sol);
|
||||||
|
|
||||||
bool allocated() const
|
bool allocated() const
|
||||||
|
@ -388,9 +388,9 @@ public:
|
|||||||
if (this->viscosity_[phaseIdx].empty())
|
if (this->viscosity_[phaseIdx].empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!this->extboC_.X_volume_.empty() && phaseIdx == oilPhaseIdx)
|
if (this->extboC_.allocated() && phaseIdx == oilPhaseIdx)
|
||||||
this->viscosity_[phaseIdx][globalDofIdx] = getValue(intQuants.oilViscosity());
|
this->viscosity_[phaseIdx][globalDofIdx] = getValue(intQuants.oilViscosity());
|
||||||
else if (!this->extboC_.X_volume_.empty() && phaseIdx == gasPhaseIdx)
|
else if (this->extboC_.allocated() && phaseIdx == gasPhaseIdx)
|
||||||
this->viscosity_[phaseIdx][globalDofIdx] = getValue(intQuants.gasViscosity());
|
this->viscosity_[phaseIdx][globalDofIdx] = getValue(intQuants.gasViscosity());
|
||||||
else
|
else
|
||||||
this->viscosity_[phaseIdx][globalDofIdx] = getValue(fs.viscosity(phaseIdx));
|
this->viscosity_[phaseIdx][globalDofIdx] = getValue(fs.viscosity(phaseIdx));
|
||||||
@ -438,23 +438,21 @@ public:
|
|||||||
this->permFact_[globalDofIdx] = intQuants.permFactor().value();
|
this->permFact_[globalDofIdx] = intQuants.permFactor().value();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->extboC_.X_volume_.empty()) {
|
if (!this->rPorV_.empty()) {
|
||||||
this->extboC_.X_volume_[globalDofIdx] = intQuants.xVolume().value();
|
const auto totVolume = elemCtx.simulator().model().dofTotalVolume(globalDofIdx);
|
||||||
|
this->rPorV_[globalDofIdx] = totVolume * intQuants.porosity().value();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->extboC_.Y_volume_.empty()) {
|
if (this->extboC_.allocated()) {
|
||||||
this->extboC_.Y_volume_[globalDofIdx] = intQuants.yVolume().value();
|
this->extboC_.assignVolumes(globalDofIdx,
|
||||||
|
intQuants.xVolume().value(),
|
||||||
|
intQuants.yVolume().value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->extboC_.Z_fraction_.empty()) {
|
if (!this->extboC_.Z_fraction_.empty()) {
|
||||||
this->extboC_.Z_fraction_[globalDofIdx] = intQuants.zFraction().value();
|
this->extboC_.Z_fraction_[globalDofIdx] = intQuants.zFraction().value();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->rPorV_.empty()) {
|
|
||||||
const auto totVolume = elemCtx.simulator().model().dofTotalVolume(globalDofIdx);
|
|
||||||
this->rPorV_[globalDofIdx] = totVolume * intQuants.porosity().value();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this->extboC_.mFracCo2_.empty()) {
|
if (!this->extboC_.mFracCo2_.empty()) {
|
||||||
const Scalar stdVolOil = getValue(fs.saturation(oilPhaseIdx)) * getValue(fs.invB(oilPhaseIdx))
|
const Scalar stdVolOil = getValue(fs.saturation(oilPhaseIdx)) * getValue(fs.invB(oilPhaseIdx))
|
||||||
+ getValue(fs.saturation(gasPhaseIdx)) * getValue(fs.invB(gasPhaseIdx)) * getValue(fs.Rv());
|
+ getValue(fs.saturation(gasPhaseIdx)) * getValue(fs.invB(gasPhaseIdx)) * getValue(fs.Rv());
|
||||||
|
Loading…
Reference in New Issue
Block a user