mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: put calculation of micp connection rates in separate method
This commit is contained in:
parent
8b38943485
commit
b1cafa25ca
@ -442,6 +442,10 @@ namespace Opm
|
|||||||
const double vap_wat_rate,
|
const double vap_wat_rate,
|
||||||
const std::vector<EvalWell>& cq_s,
|
const std::vector<EvalWell>& cq_s,
|
||||||
const IntensiveQuantities& intQuants) const;
|
const IntensiveQuantities& intQuants) const;
|
||||||
|
|
||||||
|
std::tuple<Eval,Eval,Eval>
|
||||||
|
connectionRatesMICP(const std::vector<EvalWell>& cq_s,
|
||||||
|
const IntensiveQuantities& intQuants) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -768,28 +768,10 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (has_micp) {
|
if constexpr (has_micp) {
|
||||||
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
std::tie(connectionRates[perf][Indices::contiMicrobialEqIdx],
|
||||||
EvalWell cq_s_microbe = cq_s[waterCompIdx];
|
connectionRates[perf][Indices::contiOxygenEqIdx],
|
||||||
if (this->isInjector()) {
|
connectionRates[perf][Indices::contiUreaEqIdx]) =
|
||||||
cq_s_microbe *= this->wmicrobes();
|
connectionRatesMICP(cq_s, intQuants);
|
||||||
} else {
|
|
||||||
cq_s_microbe *= this->extendEval(intQuants.microbialConcentration());
|
|
||||||
}
|
|
||||||
connectionRates[perf][Indices::contiMicrobialEqIdx] = Base::restrictEval(cq_s_microbe);
|
|
||||||
EvalWell cq_s_oxygen = cq_s[waterCompIdx];
|
|
||||||
if (this->isInjector()) {
|
|
||||||
cq_s_oxygen *= this->woxygen();
|
|
||||||
} else {
|
|
||||||
cq_s_oxygen *= this->extendEval(intQuants.oxygenConcentration());
|
|
||||||
}
|
|
||||||
connectionRates[perf][Indices::contiOxygenEqIdx] = Base::restrictEval(cq_s_oxygen);
|
|
||||||
EvalWell cq_s_urea = cq_s[waterCompIdx];
|
|
||||||
if (this->isInjector()) {
|
|
||||||
cq_s_urea *= this->wurea();
|
|
||||||
} else {
|
|
||||||
cq_s_urea *= this->extendEval(intQuants.ureaConcentration());
|
|
||||||
}
|
|
||||||
connectionRates[perf][Indices::contiUreaEqIdx] = Base::restrictEval(cq_s_urea);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store the perforation pressure for later usage.
|
// Store the perforation pressure for later usage.
|
||||||
@ -2392,4 +2374,40 @@ namespace Opm
|
|||||||
return Base::restrictEval(cq_s_sm);
|
return Base::restrictEval(cq_s_sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename TypeTag>
|
||||||
|
std::tuple<typename StandardWell<TypeTag>::Eval,
|
||||||
|
typename StandardWell<TypeTag>::Eval,
|
||||||
|
typename StandardWell<TypeTag>::Eval>
|
||||||
|
StandardWell<TypeTag>::
|
||||||
|
connectionRatesMICP(const std::vector<EvalWell>& cq_s,
|
||||||
|
const IntensiveQuantities& intQuants) const
|
||||||
|
{
|
||||||
|
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
||||||
|
EvalWell cq_s_microbe = cq_s[waterCompIdx];
|
||||||
|
if (this->isInjector()) {
|
||||||
|
cq_s_microbe *= this->wmicrobes();
|
||||||
|
} else {
|
||||||
|
cq_s_microbe *= this->extendEval(intQuants.microbialConcentration());
|
||||||
|
}
|
||||||
|
|
||||||
|
EvalWell cq_s_oxygen = cq_s[waterCompIdx];
|
||||||
|
if (this->isInjector()) {
|
||||||
|
cq_s_oxygen *= this->woxygen();
|
||||||
|
} else {
|
||||||
|
cq_s_oxygen *= this->extendEval(intQuants.oxygenConcentration());
|
||||||
|
}
|
||||||
|
|
||||||
|
EvalWell cq_s_urea = cq_s[waterCompIdx];
|
||||||
|
if (this->isInjector()) {
|
||||||
|
cq_s_urea *= this->wurea();
|
||||||
|
} else {
|
||||||
|
cq_s_urea *= this->extendEval(intQuants.ureaConcentration());
|
||||||
|
}
|
||||||
|
|
||||||
|
return {Base::restrictEval(cq_s_microbe),
|
||||||
|
Base::restrictEval(cq_s_oxygen),
|
||||||
|
Base::restrictEval(cq_s_urea)};
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user