mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move assignment of mass fractions into ExtboContainer
This commit is contained in:
parent
66ad8bc10a
commit
72245590f2
@ -48,6 +48,18 @@ allocate(const unsigned bufferSize)
|
|||||||
allocated_ = true;
|
allocated_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Scalar>
|
||||||
|
void ExtboContainer<Scalar>::
|
||||||
|
assignMassFractions(const unsigned globalDofIdx,
|
||||||
|
const Scalar gas,
|
||||||
|
const Scalar oil,
|
||||||
|
const Scalar co2)
|
||||||
|
{
|
||||||
|
this->mFracGas_[globalDofIdx] = gas;
|
||||||
|
this->mFracOil_[globalDofIdx] = oil;
|
||||||
|
this->mFracCo2_[globalDofIdx] = co2;
|
||||||
|
}
|
||||||
|
|
||||||
template<class Scalar>
|
template<class Scalar>
|
||||||
void ExtboContainer<Scalar>::
|
void ExtboContainer<Scalar>::
|
||||||
assignVolumes(const unsigned globalDofIdx,
|
assignVolumes(const unsigned globalDofIdx,
|
||||||
|
@ -40,6 +40,11 @@ class ExtboContainer
|
|||||||
public:
|
public:
|
||||||
void allocate(const unsigned bufferSize);
|
void allocate(const unsigned bufferSize);
|
||||||
|
|
||||||
|
void assignMassFractions(const unsigned globalDofIdx,
|
||||||
|
const Scalar gas,
|
||||||
|
const Scalar oil,
|
||||||
|
const Scalar co2);
|
||||||
|
|
||||||
void assignVolumes(const unsigned globalDofIdx,
|
void assignVolumes(const unsigned globalDofIdx,
|
||||||
const Scalar xVolume,
|
const Scalar xVolume,
|
||||||
const Scalar yVolume);
|
const Scalar yVolume);
|
||||||
|
@ -449,9 +449,7 @@ public:
|
|||||||
intQuants.yVolume().value());
|
intQuants.yVolume().value());
|
||||||
this->extboC_.assignZFraction(globalDofIdx,
|
this->extboC_.assignZFraction(globalDofIdx,
|
||||||
intQuants.zFraction().value());
|
intQuants.zFraction().value());
|
||||||
}
|
|
||||||
|
|
||||||
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());
|
||||||
const Scalar stdVolGas = getValue(fs.saturation(gasPhaseIdx)) * getValue(fs.invB(gasPhaseIdx))
|
const Scalar stdVolGas = getValue(fs.saturation(gasPhaseIdx)) * getValue(fs.invB(gasPhaseIdx))
|
||||||
@ -466,9 +464,10 @@ public:
|
|||||||
const Scalar rhoG = FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx);
|
const Scalar rhoG = FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx);
|
||||||
const Scalar rhoCO2 = intQuants.zRefDensity();
|
const Scalar rhoCO2 = intQuants.zRefDensity();
|
||||||
const Scalar stdMassTotal = 1.0e-10 + stdVolOil * rhoO + stdVolGas * rhoG + stdVolCo2 * rhoCO2;
|
const Scalar stdMassTotal = 1.0e-10 + stdVolOil * rhoO + stdVolGas * rhoG + stdVolCo2 * rhoCO2;
|
||||||
this->extboC_.mFracOil_[globalDofIdx] = stdVolOil * rhoO / stdMassTotal;
|
this->extboC_.assignMassFractions(globalDofIdx,
|
||||||
this->extboC_.mFracGas_[globalDofIdx] = stdVolGas * rhoG / stdMassTotal;
|
stdVolGas * rhoG / stdMassTotal,
|
||||||
this->extboC_.mFracCo2_[globalDofIdx] = stdVolCo2 * rhoCO2 / stdMassTotal;
|
stdVolOil * rhoO / stdMassTotal,
|
||||||
|
stdVolCo2 * rhoCO2 / stdMassTotal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->micpC_.allocated()) {
|
if (this->micpC_.allocated()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user