mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-11 00:41:56 -06:00
changed: put calculation of brine connection rate in separate method
This commit is contained in:
parent
a363ad6028
commit
8b38943485
@ -437,6 +437,11 @@ namespace Opm
|
|||||||
const SummaryState& summary_state,
|
const SummaryState& summary_state,
|
||||||
DeferredLogger& deferred_logger) const;
|
DeferredLogger& deferred_logger) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Eval connectionRateBrine(double& rate,
|
||||||
|
const double vap_wat_rate,
|
||||||
|
const std::vector<EvalWell>& cq_s,
|
||||||
|
const IntensiveQuantities& intQuants) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -762,21 +762,9 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (has_brine) {
|
if constexpr (has_brine) {
|
||||||
// TODO: the application of well efficiency factor has not been tested with an example yet
|
connectionRates[perf][Indices::contiBrineEqIdx] =
|
||||||
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
connectionRateBrine(perf_data.brine_rates[perf],
|
||||||
// Correction salt rate; evaporated water does not contain salt
|
perf_rates.vap_wat, cq_s, intQuants);
|
||||||
EvalWell cq_s_sm = cq_s[waterCompIdx] - perf_rates.vap_wat;
|
|
||||||
if (this->isInjector()) {
|
|
||||||
cq_s_sm *= this->wsalt();
|
|
||||||
} else {
|
|
||||||
cq_s_sm *= this->extendEval(intQuants.fluidState().saltConcentration());
|
|
||||||
}
|
|
||||||
// Note. Efficiency factor is handled in the output layer
|
|
||||||
auto& perf_rate_brine = perf_data.brine_rates;
|
|
||||||
perf_rate_brine[perf] = cq_s_sm.value();
|
|
||||||
|
|
||||||
cq_s_sm *= this->well_efficiency_factor_;
|
|
||||||
connectionRates[perf][Indices::contiBrineEqIdx] = Base::restrictEval(cq_s_sm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (has_micp) {
|
if constexpr (has_micp) {
|
||||||
@ -2378,4 +2366,30 @@ namespace Opm
|
|||||||
return num_pri_vars;
|
return num_pri_vars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename TypeTag>
|
||||||
|
typename StandardWell<TypeTag>::Eval
|
||||||
|
StandardWell<TypeTag>::
|
||||||
|
connectionRateBrine(double& rate,
|
||||||
|
const double vap_wat_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);
|
||||||
|
// Correction salt rate; evaporated water does not contain salt
|
||||||
|
EvalWell cq_s_sm = cq_s[waterCompIdx] - vap_wat_rate;
|
||||||
|
if (this->isInjector()) {
|
||||||
|
cq_s_sm *= this->wsalt();
|
||||||
|
} else {
|
||||||
|
cq_s_sm *= this->extendEval(intQuants.fluidState().saltConcentration());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note. Efficiency factor is handled in the output layer
|
||||||
|
rate = cq_s_sm.value();
|
||||||
|
|
||||||
|
cq_s_sm *= this->well_efficiency_factor_;
|
||||||
|
return Base::restrictEval(cq_s_sm);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user