mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
PerforationRates: template Scalar type
This commit is contained in:
parent
1be9a08d3d
commit
d2cbf33b62
@ -197,7 +197,7 @@ namespace Opm
|
||||
const bool& allow_cf,
|
||||
std::vector<Value>& cq_s,
|
||||
Value& perf_press,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
template<class Value>
|
||||
@ -214,7 +214,7 @@ namespace Opm
|
||||
const std::vector<Value>& cmix_s,
|
||||
std::vector<Value>& cq_s,
|
||||
Value& perf_press,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
// compute the fluid properties, such as densities, viscosities, and so on, in the segments
|
||||
|
@ -371,7 +371,7 @@ namespace Opm
|
||||
const Scalar seg_pressure = segment_pressure[seg];
|
||||
std::vector<Scalar> cq_s(this->num_components_, 0.);
|
||||
Scalar perf_press = 0.0;
|
||||
PerforationRates perf_rates;
|
||||
PerforationRates<Scalar> perf_rates;
|
||||
computePerfRate(intQuants, mob, Tw, seg, perf, seg_pressure,
|
||||
allow_cf, cq_s, perf_press, perf_rates, deferred_logger);
|
||||
|
||||
@ -870,7 +870,7 @@ namespace Opm
|
||||
const std::vector<Value>& cmix_s,
|
||||
std::vector<Value>& cq_s,
|
||||
Value& perf_press,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
// pressure difference between the segment and the perforation
|
||||
@ -1006,7 +1006,7 @@ namespace Opm
|
||||
const bool& allow_cf,
|
||||
std::vector<Value>& cq_s,
|
||||
Value& perf_press,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
DeferredLogger& deferred_logger) const
|
||||
|
||||
{
|
||||
@ -1874,7 +1874,7 @@ namespace Opm
|
||||
const std::vector<Scalar> Tw = this->wellIndex(perf, int_quants, trans_mult, wellstate_nupcol);
|
||||
std::vector<EvalWell> cq_s(this->num_components_, 0.0);
|
||||
EvalWell perf_press;
|
||||
PerforationRates perfRates;
|
||||
PerforationRates<Scalar> perfRates;
|
||||
computePerfRate(int_quants, mob, Tw, seg, perf, seg_pressure,
|
||||
allow_cf, cq_s, perf_press, perfRates, deferred_logger);
|
||||
|
||||
@ -2190,7 +2190,7 @@ namespace Opm
|
||||
const std::vector<Scalar> Tw = this->wellIndex(perf, int_quants, trans_mult, wellstate_nupcol);
|
||||
std::vector<Scalar> cq_s(this->num_components_, 0.0);
|
||||
Scalar perf_press = 0.0;
|
||||
PerforationRates perf_rates;
|
||||
PerforationRates<Scalar> perf_rates;
|
||||
computePerfRate(int_quants, mob, Tw, seg, perf, seg_pressure,
|
||||
allow_cf, cq_s, perf_press, perf_rates, deferred_logger);
|
||||
for (int comp = 0; comp < this->num_components_; ++comp) {
|
||||
|
@ -36,12 +36,13 @@ struct PerforationData
|
||||
std::size_t ecl_index{};
|
||||
};
|
||||
|
||||
template<class Scalar>
|
||||
struct PerforationRates
|
||||
{
|
||||
double dis_gas = 0.0;
|
||||
double dis_gas_in_water = 0.0;
|
||||
double vap_oil = 0.0;
|
||||
double vap_wat = 0.0;
|
||||
Scalar dis_gas = 0.0;
|
||||
Scalar dis_gas_in_water = 0.0;
|
||||
Scalar vap_oil = 0.0;
|
||||
Scalar vap_wat = 0.0;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -291,7 +291,7 @@ namespace Opm
|
||||
const int perf,
|
||||
const bool allow_cf,
|
||||
std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
template<class Value>
|
||||
@ -309,7 +309,7 @@ namespace Opm
|
||||
const Value& skin_pressure,
|
||||
const std::vector<Value>& cmix_s,
|
||||
std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
void computeWellRatesWithBhpIterations(const Simulator& ebosSimulator,
|
||||
@ -469,7 +469,7 @@ namespace Opm
|
||||
|
||||
template<class Value>
|
||||
void gasOilPerfRateInj(const std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
const Value& rv,
|
||||
const Value& rs,
|
||||
const Value& pressure,
|
||||
@ -478,20 +478,20 @@ namespace Opm
|
||||
|
||||
template<class Value>
|
||||
void gasOilPerfRateProd(std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
const Value& rv,
|
||||
const Value& rs,
|
||||
const Value& rvw) const;
|
||||
|
||||
template<class Value>
|
||||
void gasWaterPerfRateProd(std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
const Value& rvw,
|
||||
const Value& rsw) const;
|
||||
|
||||
template<class Value>
|
||||
void gasWaterPerfRateInj(const std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
const Value& rvw,
|
||||
const Value& rsw,
|
||||
const Value& pressure,
|
||||
|
@ -130,7 +130,7 @@ namespace Opm
|
||||
const int perf,
|
||||
const bool allow_cf,
|
||||
std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
auto obtain = [this](const Eval& value)
|
||||
@ -237,7 +237,7 @@ namespace Opm
|
||||
const Value& skin_pressure,
|
||||
const std::vector<Value>& cmix_s,
|
||||
std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
// Pressure drawdown (also used to determine direction of flow)
|
||||
@ -502,8 +502,8 @@ namespace Opm
|
||||
std::vector<EvalWell> mob(this->num_components_, {this->primary_variables_.numWellEq() + Indices::numEq, 0.});
|
||||
getMobility(simulator, perf, mob, deferred_logger);
|
||||
|
||||
PerforationRates perf_rates;
|
||||
Scalar trans_mult = simulator.problem().template wellTransMultiplier<double>(intQuants, cell_idx);
|
||||
PerforationRates<Scalar> perf_rates;
|
||||
Scalar trans_mult = simulator.problem().template wellTransMultiplier<Scalar>(intQuants, cell_idx);
|
||||
const auto& wellstate_nupcol = simulator.problem().wellModel().nupcolWellState().well(this->index_of_well_);
|
||||
const std::vector<Scalar> Tw = this->wellIndex(perf, intQuants, trans_mult, wellstate_nupcol);
|
||||
computePerfRate(intQuants, mob, bhp, Tw, perf, allow_cf,
|
||||
@ -1469,7 +1469,7 @@ namespace Opm
|
||||
const std::vector<Scalar> Tw = this->wellIndex(perf, intQuants, trans_mult, wellstate_nupcol);
|
||||
|
||||
std::vector<Scalar> cq_s(this->num_components_, 0.);
|
||||
PerforationRates perf_rates;
|
||||
PerforationRates<Scalar> perf_rates;
|
||||
computePerfRate(intQuants, mob, bhp, Tw, perf, allow_cf,
|
||||
cq_s, perf_rates, deferred_logger);
|
||||
|
||||
@ -1838,7 +1838,7 @@ namespace Opm
|
||||
const EvalWell& bhp = this->primary_variables_.eval(Bhp);
|
||||
|
||||
std::vector<EvalWell> cq_s(this->num_components_, {this->primary_variables_.numWellEq() + Indices::numEq, 0.});
|
||||
PerforationRates perf_rates;
|
||||
PerforationRates<Scalar> perf_rates;
|
||||
Scalar trans_mult = simulator.problem().template wellTransMultiplier<Scalar>(int_quant, cell_idx);
|
||||
const auto& wellstate_nupcol = simulator.problem().wellModel().nupcolWellState().well(this->index_of_well_);
|
||||
const std::vector<Scalar> Tw = this->wellIndex(perf, int_quant, trans_mult, wellstate_nupcol);
|
||||
@ -2463,7 +2463,7 @@ namespace Opm
|
||||
Scalar trans_mult = simulator.problem().template wellTransMultiplier<Scalar>(intQuants, cell_idx);
|
||||
const auto& wellstate_nupcol = simulator.problem().wellModel().nupcolWellState().well(this->index_of_well_);
|
||||
const std::vector<Scalar> Tw = this->wellIndex(perf, intQuants, trans_mult, wellstate_nupcol);
|
||||
PerforationRates perf_rates;
|
||||
PerforationRates<Scalar> perf_rates;
|
||||
computePerfRate(intQuants, mob, bhp.value(), Tw, perf, allow_cf,
|
||||
cq_s, perf_rates, deferred_logger);
|
||||
for (int comp = 0; comp < this->num_components_; ++comp) {
|
||||
@ -2596,7 +2596,7 @@ namespace Opm
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
gasOilPerfRateInj(const std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
const Value& rv,
|
||||
const Value& rs,
|
||||
const Value& pressure,
|
||||
@ -2644,7 +2644,7 @@ namespace Opm
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
gasOilPerfRateProd(std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
const Value& rv,
|
||||
const Value& rs,
|
||||
const Value& rvw) const
|
||||
@ -2680,7 +2680,7 @@ namespace Opm
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
gasWaterPerfRateProd(std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
const Value& rvw,
|
||||
const Value& rsw) const
|
||||
{
|
||||
@ -2704,7 +2704,7 @@ namespace Opm
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
gasWaterPerfRateInj(const std::vector<Value>& cq_s,
|
||||
PerforationRates& perf_rates,
|
||||
PerforationRates<Scalar>& perf_rates,
|
||||
const Value& rvw,
|
||||
const Value& rsw,
|
||||
const Value& pressure,
|
||||
|
Loading…
Reference in New Issue
Block a user