|
std::vector< int > | buildAllCells (const int nc) |
|
template<class PU > |
std::vector< bool > | activePhases (const PU &pu) |
|
template<class PU > |
std::vector< int > | active2Canonical (const PU &pu) |
|
double | getGravity (const double *g, const int dim) |
|
double | rateToCompare (const std::vector< double > &well_phase_flow_rate, const int well, const int num_phases, const double *distr) |
|
bool | constraintBroken (const std::vector< double > &bhp, const std::vector< double > &thp, const std::vector< double > &well_phase_flow_rate, const int well, const int num_phases, const WellType &well_type, const WellControls *wc, const int ctrl_index) |
|
double | computeHydrostaticCorrection (const Wells &wells, const int w, double vfp_ref_depth, const ADB::V &well_perforation_densities, const double gravity) |
|
ADB::V | computeHydrostaticCorrection (const Wells &wells, const ADB::V vfp_ref_depth, const ADB::V &well_perforation_densities, const double gravity) |
|
double | infinityNorm (const ADB &a, const boost::any &pinfo=boost::any()) |
| Compute the L-infinity norm of a vector This function is not suitable to compute on the well equations. More...
|
|
double | infinityNormWell (const ADB &a, const boost::any &pinfo) |
| Compute the L-infinity norm of a vector representing a well equation. More...
|
|
template<class PU > |
int | solventPos (const PU &pu) |
|
double | zeroIfNan (const double &value) |
|
ADB | zeroIfNan (const ADB &values) |
|
template<typename T > |
static T | getFlo (const T &aqua, const T &liquid, const T &vapour, const VFPProdTable::FLO_TYPE &type) |
|
template<typename T > |
static T | getFlo (const T &aqua, const T &liquid, const T &vapour, const VFPInjTable::FLO_TYPE &type) |
|
template<typename T > |
static T | getWFR (const T &aqua, const T &liquid, const T &vapour, const VFPProdTable::WFR_TYPE &type) |
|
template<typename T > |
static T | getGFR (const T &aqua, const T &liquid, const T &vapour, const VFPProdTable::GFR_TYPE &type) |
|
InterpData | findInterpData (const double &value, const std::vector< double > &values) |
|
VFPEvaluation | operator+ (VFPEvaluation lhs, const VFPEvaluation &rhs) |
|
VFPEvaluation | operator- (VFPEvaluation lhs, const VFPEvaluation &rhs) |
|
VFPEvaluation | operator* (double lhs, const VFPEvaluation &rhs) |
|
VFPEvaluation | interpolate (const VFPProdTable::array_type &array, const InterpData &flo_i, const InterpData &thp_i, const InterpData &wfr_i, const InterpData &gfr_i, const InterpData &alq_i) |
|
VFPEvaluation | interpolate (const VFPInjTable::array_type &array, const InterpData &flo_i, const InterpData &thp_i) |
|
VFPEvaluation | bhp (const VFPProdTable *table, const double &aqua, const double &liquid, const double &vapour, const double &thp, const double &alq) |
|
VFPEvaluation | bhp (const VFPInjTable *table, const double &aqua, const double &liquid, const double &vapour, const double &thp) |
|
template<typename T > |
const T * | getTable (const std::map< int, T * > tables, int table_id) |
|
void | extendBlockPattern (const ADB &x, std::vector< int > &block_pattern) |
|
std::vector< int > | commonBlockPattern (const ADB &x1, const ADB &x2, const ADB &x3, const ADB &x4) |
|
std::vector< int > | commonBlockPattern (const ADB &x1, const ADB &x2, const ADB &x3, const ADB &x4, const ADB &x5) |
|
template<typename TYPE , typename TABLE > |
TYPE | getType (const TABLE *table) |
|
template<> |
VFPProdTable::FLO_TYPE | getType (const VFPProdTable *table) |
|
template<> |
VFPProdTable::WFR_TYPE | getType (const VFPProdTable *table) |
|
template<> |
VFPProdTable::GFR_TYPE | getType (const VFPProdTable *table) |
|
template<> |
VFPInjTable::FLO_TYPE | getType (const VFPInjTable *table) |
|
template<typename TYPE > |
ADB | getValue (const ADB &aqua, const ADB &liquid, const ADB &vapour, TYPE type) |
|
template<> |
ADB | getValue (const ADB &aqua, const ADB &liquid, const ADB &vapour, VFPProdTable::FLO_TYPE type) |
|
template<> |
ADB | getValue (const ADB &aqua, const ADB &liquid, const ADB &vapour, VFPProdTable::WFR_TYPE type) |
|
template<> |
ADB | getValue (const ADB &aqua, const ADB &liquid, const ADB &vapour, VFPProdTable::GFR_TYPE type) |
|
template<> |
ADB | getValue (const ADB &aqua, const ADB &liquid, const ADB &vapour, VFPInjTable::FLO_TYPE type) |
|
template<typename TYPE , typename TABLE > |
ADB | combineADBVars (const std::vector< const TABLE * > &well_tables, const ADB &aqua, const ADB &liquid, const ADB &vapour) |
|
double | findX (const double &x0, const double &x1, const double &y0, const double &y1, const double &y) |
|
double | findTHP (const std::vector< double > &bhp_array, const std::vector< double > &thp_array, double bhp) |
|
template<class PU >
std::vector<int> Opm::detail::active2Canonical |
( |
const PU & |
pu | ) |
|
template<class PU >
std::vector<bool> Opm::detail::activePhases |
( |
const PU & |
pu | ) |
|
VFPEvaluation Opm::detail::bhp |
( |
const VFPProdTable * |
table, |
|
|
const double & |
aqua, |
|
|
const double & |
liquid, |
|
|
const double & |
vapour, |
|
|
const double & |
thp, |
|
|
const double & |
alq |
|
) |
| |
|
inline |
VFPEvaluation Opm::detail::bhp |
( |
const VFPInjTable * |
table, |
|
|
const double & |
aqua, |
|
|
const double & |
liquid, |
|
|
const double & |
vapour, |
|
|
const double & |
thp |
|
) |
| |
|
inline |
std::vector<int> Opm::detail::buildAllCells |
( |
const int |
nc | ) |
|
|
inline |
template<typename TYPE , typename TABLE >
ADB Opm::detail::combineADBVars |
( |
const std::vector< const TABLE * > & |
well_tables, |
|
|
const ADB & |
aqua, |
|
|
const ADB & |
liquid, |
|
|
const ADB & |
vapour |
|
) |
| |
Given m wells and n types of VFP variables (e.g., FLO = {FLO_OIL, FLO_LIQ} this function combines the n types of ADB objects, so that each of the m wells gets the right ADB. - Parameters
-
TYPE | Type of variable to return, e.g., FLO_TYPE, WFR_TYPE, GFR_TYPE |
TABLE | Type of table to use, e.g., VFPInjTable, VFPProdTable. |
References Opm::AutoDiffBlock< double >::constant(), Opm::AutoDiffBlock< Scalar >::size(), Opm::subset(), and Opm::superset().
std::vector<int> Opm::detail::commonBlockPattern |
( |
const ADB & |
x1, |
|
|
const ADB & |
x2, |
|
|
const ADB & |
x3, |
|
|
const ADB & |
x4 |
|
) |
| |
|
inline |
std::vector<int> Opm::detail::commonBlockPattern |
( |
const ADB & |
x1, |
|
|
const ADB & |
x2, |
|
|
const ADB & |
x3, |
|
|
const ADB & |
x4, |
|
|
const ADB & |
x5 |
|
) |
| |
|
inline |
double Opm::detail::computeHydrostaticCorrection |
( |
const Wells & |
wells, |
|
|
const int |
w, |
|
|
double |
vfp_ref_depth, |
|
|
const ADB::V & |
well_perforation_densities, |
|
|
const double |
gravity |
|
) |
| |
|
inline |
ADB::V Opm::detail::computeHydrostaticCorrection |
( |
const Wells & |
wells, |
|
|
const ADB::V |
vfp_ref_depth, |
|
|
const ADB::V & |
well_perforation_densities, |
|
|
const double |
gravity |
|
) |
| |
|
inline |
bool Opm::detail::constraintBroken |
( |
const std::vector< double > & |
bhp, |
|
|
const std::vector< double > & |
thp, |
|
|
const std::vector< double > & |
well_phase_flow_rate, |
|
|
const int |
well, |
|
|
const int |
num_phases, |
|
|
const WellType & |
well_type, |
|
|
const WellControls * |
wc, |
|
|
const int |
ctrl_index |
|
) |
| |
|
inline |
void Opm::detail::extendBlockPattern |
( |
const ADB & |
x, |
|
|
std::vector< int > & |
block_pattern |
|
) |
| |
|
inline |
InterpData Opm::detail::findInterpData |
( |
const double & |
value, |
|
|
const std::vector< double > & |
values |
|
) |
| |
|
inline |
double Opm::detail::findTHP |
( |
const std::vector< double > & |
bhp_array, |
|
|
const std::vector< double > & |
thp_array, |
|
|
double |
bhp |
|
) |
| |
|
inline |
This function finds the value of THP given a specific BHP. Essentially: Given the function f(thp_array(x)) = bhp_array(x), which is piecewise linear, find thp so that f(thp) = bhp.
Our interpolated bhp_array will be montonic increasing for increasing THP if our input BHP values are monotonic increasing for increasing THP values. However, if we have to extrapolate along any of the other axes, this guarantee holds no more, and bhp_array may be "random"
References findX().
double Opm::detail::findX |
( |
const double & |
x0, |
|
|
const double & |
x1, |
|
|
const double & |
y0, |
|
|
const double & |
y1, |
|
|
const double & |
y |
|
) |
| |
|
inline |
Helper function that finds x for a given value of y for a line NOTE ORDER OF ARGUMENTS
y = y0 + (dy / dx) * (x - x0)
=> x = x0 + (y - y0) * (dx / dy)
If dy is zero, use x1 as the value.
Referenced by findTHP().
template<typename T >
static T Opm::detail::getFlo |
( |
const T & |
aqua, |
|
|
const T & |
liquid, |
|
|
const T & |
vapour, |
|
|
const VFPProdTable::FLO_TYPE & |
type |
|
) |
| |
|
static |
Computes the flo parameter according to the flo_type_ for production tables - Returns
- Production rate of oil, gas or liquid.
Referenced by bhp(), and getValue().
template<typename T >
static T Opm::detail::getFlo |
( |
const T & |
aqua, |
|
|
const T & |
liquid, |
|
|
const T & |
vapour, |
|
|
const VFPInjTable::FLO_TYPE & |
type |
|
) |
| |
|
static |
Computes the flo parameter according to the flo_type_ for injection tables - Returns
- Production rate of oil, gas or liquid.
template<typename T >
static T Opm::detail::getGFR |
( |
const T & |
aqua, |
|
|
const T & |
liquid, |
|
|
const T & |
vapour, |
|
|
const VFPProdTable::GFR_TYPE & |
type |
|
) |
| |
|
static |
Computes the gfr parameter according to the gfr_type_ - Returns
- Production rate of oil, gas or liquid.
References zeroIfNan().
Referenced by bhp(), and getValue().
double Opm::detail::getGravity |
( |
const double * |
g, |
|
|
const int |
dim |
|
) |
| |
|
inline |
template<typename T >
const T* Opm::detail::getTable |
( |
const std::map< int, T * > |
tables, |
|
|
int |
table_id |
|
) |
| |
Returns the table from the map if found, or throws an exception
template<typename TYPE , typename TABLE >
TYPE Opm::detail::getType |
( |
const TABLE * |
table | ) |
|
Returns the type variable for FLO/GFR/WFR for production tables
template<>
VFPProdTable::FLO_TYPE Opm::detail::getType |
( |
const VFPProdTable * |
table | ) |
|
|
inline |
template<>
VFPProdTable::WFR_TYPE Opm::detail::getType |
( |
const VFPProdTable * |
table | ) |
|
|
inline |
template<>
VFPProdTable::GFR_TYPE Opm::detail::getType |
( |
const VFPProdTable * |
table | ) |
|
|
inline |
template<>
VFPInjTable::FLO_TYPE Opm::detail::getType |
( |
const VFPInjTable * |
table | ) |
|
|
inline |
Returns the type variable for FLO for injection tables
template<typename TYPE >
ADB Opm::detail::getValue |
( |
const ADB & |
aqua, |
|
|
const ADB & |
liquid, |
|
|
const ADB & |
vapour, |
|
|
TYPE |
type |
|
) |
| |
Returns the actual ADB for the type of FLO/GFR/WFR type
template<>
ADB Opm::detail::getValue |
( |
const ADB & |
aqua, |
|
|
const ADB & |
liquid, |
|
|
const ADB & |
vapour, |
|
|
VFPProdTable::FLO_TYPE |
type |
|
) |
| |
|
inline |
template<>
ADB Opm::detail::getValue |
( |
const ADB & |
aqua, |
|
|
const ADB & |
liquid, |
|
|
const ADB & |
vapour, |
|
|
VFPProdTable::WFR_TYPE |
type |
|
) |
| |
|
inline |
template<>
ADB Opm::detail::getValue |
( |
const ADB & |
aqua, |
|
|
const ADB & |
liquid, |
|
|
const ADB & |
vapour, |
|
|
VFPProdTable::GFR_TYPE |
type |
|
) |
| |
|
inline |
template<>
ADB Opm::detail::getValue |
( |
const ADB & |
aqua, |
|
|
const ADB & |
liquid, |
|
|
const ADB & |
vapour, |
|
|
VFPInjTable::FLO_TYPE |
type |
|
) |
| |
|
inline |
template<typename T >
static T Opm::detail::getWFR |
( |
const T & |
aqua, |
|
|
const T & |
liquid, |
|
|
const T & |
vapour, |
|
|
const VFPProdTable::WFR_TYPE & |
type |
|
) |
| |
|
static |
Computes the wfr parameter according to the wfr_type_ - Returns
- Production rate of oil, gas or liquid.
References zeroIfNan().
Referenced by bhp(), and getValue().
double Opm::detail::infinityNorm |
( |
const ADB & |
a, |
|
|
const boost::any & |
pinfo = boost::any() |
|
) |
| |
|
inline |
double Opm::detail::infinityNormWell |
( |
const ADB & |
a, |
|
|
const boost::any & |
pinfo |
|
) |
| |
|
inline |
VFPEvaluation Opm::detail::interpolate |
( |
const VFPProdTable::array_type & |
array, |
|
|
const InterpData & |
flo_i, |
|
|
const InterpData & |
thp_i, |
|
|
const InterpData & |
wfr_i, |
|
|
const InterpData & |
gfr_i, |
|
|
const InterpData & |
alq_i |
|
) |
| |
|
inline |
VFPEvaluation Opm::detail::interpolate |
( |
const VFPInjTable::array_type & |
array, |
|
|
const InterpData & |
flo_i, |
|
|
const InterpData & |
thp_i |
|
) |
| |
|
inline |
This basically models interpolate(VFPProdTable::array_type, ...) which performs 5D interpolation, but here for the 2D case only
References Opm::detail::VFPEvaluation::dalq, Opm::detail::VFPEvaluation::dflo, Opm::detail::VFPEvaluation::dgfr, Opm::detail::VFPEvaluation::dthp, Opm::detail::VFPEvaluation::dwfr, Opm::detail::InterpData::factor_, Opm::detail::InterpData::ind_, Opm::detail::InterpData::inv_dist_, and Opm::detail::VFPEvaluation::value.
VFPEvaluation Opm::detail::operator* |
( |
double |
lhs, |
|
|
const VFPEvaluation & |
rhs |
|
) |
| |
|
inline |
VFPEvaluation Opm::detail::operator+ |
( |
VFPEvaluation |
lhs, |
|
|
const VFPEvaluation & |
rhs |
|
) |
| |
|
inline |
VFPEvaluation Opm::detail::operator- |
( |
VFPEvaluation |
lhs, |
|
|
const VFPEvaluation & |
rhs |
|
) |
| |
|
inline |
double Opm::detail::rateToCompare |
( |
const std::vector< double > & |
well_phase_flow_rate, |
|
|
const int |
well, |
|
|
const int |
num_phases, |
|
|
const double * |
distr |
|
) |
| |
|
inline |
template<class PU >
int Opm::detail::solventPos |
( |
const PU & |
pu | ) |
|
double Opm::detail::zeroIfNan |
( |
const double & |
value | ) |
|
|
inline |
ADB Opm::detail::zeroIfNan |
( |
const ADB & |
values | ) |
|
|
inline |
|