mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
StandardWell: move connectionRatePolymer to Connections class
This commit is contained in:
parent
bf5108d09f
commit
56014ccff9
@ -443,11 +443,6 @@ namespace Opm
|
|||||||
const IntensiveQuantities& intQuants,
|
const IntensiveQuantities& intQuants,
|
||||||
DeferredLogger& deferred_logger) const;
|
DeferredLogger& deferred_logger) const;
|
||||||
|
|
||||||
std::tuple<Eval,EvalWell>
|
|
||||||
connectionRatePolymer(double& rate,
|
|
||||||
const std::vector<EvalWell>& cq_s,
|
|
||||||
const IntensiveQuantities& intQuants) const;
|
|
||||||
|
|
||||||
std::tuple<Eval,EvalWell>
|
std::tuple<Eval,EvalWell>
|
||||||
connectionRatezFraction(double& rate,
|
connectionRatezFraction(double& rate,
|
||||||
const double dis_gas_rate,
|
const double dis_gas_rate,
|
||||||
|
@ -615,6 +615,30 @@ connectionRatesMICP(const std::vector<EvalWell>& cq_s,
|
|||||||
well_.restrictEval(cq_s_urea)};
|
well_.restrictEval(cq_s_urea)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class FluidSystem, class Indices, class Scalar>
|
||||||
|
std::tuple<typename StandardWellConnections<FluidSystem,Indices,Scalar>::Eval,
|
||||||
|
typename StandardWellConnections<FluidSystem,Indices,Scalar>::EvalWell>
|
||||||
|
StandardWellConnections<FluidSystem,Indices,Scalar>::
|
||||||
|
connectionRatePolymer(double& rate,
|
||||||
|
const std::vector<EvalWell>& cq_s,
|
||||||
|
const std::variant<Scalar,EvalWell>& polymerConcentration) const
|
||||||
|
{
|
||||||
|
// TODO: the application of well efficiency factor has not been tested with an example yet
|
||||||
|
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
||||||
|
EvalWell cq_s_poly = cq_s[waterCompIdx];
|
||||||
|
if (well_.isInjector()) {
|
||||||
|
cq_s_poly *= std::get<Scalar>(polymerConcentration);
|
||||||
|
} else {
|
||||||
|
cq_s_poly *= std::get<EvalWell>(polymerConcentration);
|
||||||
|
}
|
||||||
|
// Note. Efficiency factor is handled in the output layer
|
||||||
|
rate = cq_s_poly.value();
|
||||||
|
|
||||||
|
cq_s_poly *= well_.wellEfficiencyFactor();
|
||||||
|
|
||||||
|
return {well_.restrictEval(cq_s_poly), cq_s_poly};
|
||||||
|
}
|
||||||
|
|
||||||
#define INSTANCE(...) \
|
#define INSTANCE(...) \
|
||||||
template class StandardWellConnections<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>, \
|
template class StandardWellConnections<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>, \
|
||||||
__VA_ARGS__,double>;
|
__VA_ARGS__,double>;
|
||||||
|
@ -93,6 +93,11 @@ public:
|
|||||||
const Phase transportPhase,
|
const Phase transportPhase,
|
||||||
DeferredLogger& deferred_logger) const;
|
DeferredLogger& deferred_logger) const;
|
||||||
|
|
||||||
|
std::tuple<Eval,EvalWell>
|
||||||
|
connectionRatePolymer(double& rate,
|
||||||
|
const std::vector<EvalWell>& cq_s,
|
||||||
|
const std::variant<Scalar,EvalWell>& polymerConcentration) const;
|
||||||
|
|
||||||
std::tuple<Eval,Eval,Eval>
|
std::tuple<Eval,Eval,Eval>
|
||||||
connectionRatesMICP(const std::vector<EvalWell>& cq_s,
|
connectionRatesMICP(const std::vector<EvalWell>& cq_s,
|
||||||
const std::variant<Scalar,EvalWell>& microbialConcentration,
|
const std::variant<Scalar,EvalWell>& microbialConcentration,
|
||||||
|
@ -524,11 +524,19 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (has_polymer) {
|
if constexpr (has_polymer) {
|
||||||
|
std::variant<Scalar,EvalWell> polymerConcentration;
|
||||||
|
if (this->isInjector()) {
|
||||||
|
polymerConcentration = this->wpolymer();
|
||||||
|
} else {
|
||||||
|
polymerConcentration = this->extendEval(intQuants.polymerConcentration() *
|
||||||
|
intQuants.polymerViscosityCorrection());
|
||||||
|
}
|
||||||
|
|
||||||
[[maybe_unused]] EvalWell cq_s_poly;
|
[[maybe_unused]] EvalWell cq_s_poly;
|
||||||
std::tie(connectionRates[perf][Indices::contiPolymerEqIdx],
|
std::tie(connectionRates[perf][Indices::contiPolymerEqIdx],
|
||||||
cq_s_poly) =
|
cq_s_poly) =
|
||||||
connectionRatePolymer(perf_data.polymer_rates[perf],
|
this->connections_.connectionRatePolymer(perf_data.polymer_rates[perf],
|
||||||
cq_s, intQuants);
|
cq_s, polymerConcentration);
|
||||||
|
|
||||||
if constexpr (Base::has_polymermw) {
|
if constexpr (Base::has_polymermw) {
|
||||||
updateConnectionRatePolyMW(cq_s_poly, intQuants, well_state,
|
updateConnectionRatePolyMW(cq_s_poly, intQuants, well_state,
|
||||||
@ -2248,31 +2256,6 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename TypeTag>
|
|
||||||
std::tuple<typename StandardWell<TypeTag>::Eval,
|
|
||||||
typename StandardWell<TypeTag>::EvalWell>
|
|
||||||
StandardWell<TypeTag>::
|
|
||||||
connectionRatePolymer(double& rate,
|
|
||||||
const std::vector<EvalWell>& cq_s,
|
|
||||||
const IntensiveQuantities& intQuants) const
|
|
||||||
{
|
|
||||||
// TODO: the application of well efficiency factor has not been tested with an example yet
|
|
||||||
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
|
||||||
EvalWell cq_s_poly = cq_s[waterCompIdx];
|
|
||||||
if (this->isInjector()) {
|
|
||||||
cq_s_poly *= this->wpolymer();
|
|
||||||
} else {
|
|
||||||
cq_s_poly *= this->extendEval(intQuants.polymerConcentration() * intQuants.polymerViscosityCorrection());
|
|
||||||
}
|
|
||||||
// Note. Efficiency factor is handled in the output layer
|
|
||||||
rate = cq_s_poly.value();
|
|
||||||
|
|
||||||
cq_s_poly *= this->well_efficiency_factor_;
|
|
||||||
|
|
||||||
return {Base::restrictEval(cq_s_poly), cq_s_poly};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <typename TypeTag>
|
template <typename TypeTag>
|
||||||
std::tuple<typename StandardWell<TypeTag>::Eval,
|
std::tuple<typename StandardWell<TypeTag>::Eval,
|
||||||
typename StandardWell<TypeTag>::EvalWell>
|
typename StandardWell<TypeTag>::EvalWell>
|
||||||
|
Loading…
Reference in New Issue
Block a user