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;
|
||||
}
|
||||
|
||||
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>
|
||||
void ExtboContainer<Scalar>::
|
||||
outputRestart(data::Solution& sol)
|
||||
|
@ -40,6 +40,10 @@ class ExtboContainer
|
||||
public:
|
||||
void allocate(const unsigned bufferSize);
|
||||
|
||||
void assignVolumes(const unsigned globalDofIdx,
|
||||
const Scalar xVolume,
|
||||
const Scalar yVolume);
|
||||
|
||||
void outputRestart(data::Solution& sol);
|
||||
|
||||
bool allocated() const
|
||||
|
@ -388,9 +388,9 @@ public:
|
||||
if (this->viscosity_[phaseIdx].empty())
|
||||
continue;
|
||||
|
||||
if (!this->extboC_.X_volume_.empty() && phaseIdx == oilPhaseIdx)
|
||||
if (this->extboC_.allocated() && phaseIdx == oilPhaseIdx)
|
||||
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());
|
||||
else
|
||||
this->viscosity_[phaseIdx][globalDofIdx] = getValue(fs.viscosity(phaseIdx));
|
||||
@ -438,23 +438,21 @@ public:
|
||||
this->permFact_[globalDofIdx] = intQuants.permFactor().value();
|
||||
}
|
||||
|
||||
if (!this->extboC_.X_volume_.empty()) {
|
||||
this->extboC_.X_volume_[globalDofIdx] = intQuants.xVolume().value();
|
||||
if (!this->rPorV_.empty()) {
|
||||
const auto totVolume = elemCtx.simulator().model().dofTotalVolume(globalDofIdx);
|
||||
this->rPorV_[globalDofIdx] = totVolume * intQuants.porosity().value();
|
||||
}
|
||||
|
||||
if (!this->extboC_.Y_volume_.empty()) {
|
||||
this->extboC_.Y_volume_[globalDofIdx] = intQuants.yVolume().value();
|
||||
if (this->extboC_.allocated()) {
|
||||
this->extboC_.assignVolumes(globalDofIdx,
|
||||
intQuants.xVolume().value(),
|
||||
intQuants.yVolume().value());
|
||||
}
|
||||
|
||||
if (!this->extboC_.Z_fraction_.empty()) {
|
||||
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()) {
|
||||
const Scalar stdVolOil = getValue(fs.saturation(oilPhaseIdx)) * getValue(fs.invB(oilPhaseIdx))
|
||||
+ getValue(fs.saturation(gasPhaseIdx)) * getValue(fs.invB(gasPhaseIdx)) * getValue(fs.Rv());
|
||||
|
Loading…
Reference in New Issue
Block a user