My Project
Loading...
Searching...
No Matches
Opm::VFPHelpers< Scalar > Class Template Reference

Static Public Member Functions

static detail::InterpData< Scalar > findInterpData (const Scalar value_in, const std::vector< double > &values)
 Helper function to find indices etc.
 
static detail::VFPEvaluation< Scalar > interpolate (const VFPProdTable &table, const detail::InterpData< Scalar > &flo_i, const detail::InterpData< Scalar > &thp_i, const detail::InterpData< Scalar > &wfr_i, const detail::InterpData< Scalar > &gfr_i, const detail::InterpData< Scalar > &alq_i)
 Helper function which interpolates data using the indices etc.
 
static detail::VFPEvaluation< Scalar > interpolate (const VFPInjTable &table, const detail::InterpData< Scalar > &flo_i, const detail::InterpData< Scalar > &thp_i)
 This basically models interpolate(VFPProdTable::array_type, ...) which performs 5D interpolation, but here for the 2D case only.
 
static detail::VFPEvaluation< Scalar > bhp (const VFPProdTable &table, const Scalar aqua, const Scalar liquid, const Scalar vapour, const Scalar thp, const Scalar alq, const Scalar explicit_wfr, const Scalar explicit_gfr, const bool use_vfpexplicit)
 
static detail::VFPEvaluation< Scalar > bhp (const VFPInjTable &table, const Scalar aqua, const Scalar liquid, const Scalar vapour, const Scalar thp)
 
static Scalar findTHP (const std::vector< Scalar > &bhp_array, const std::vector< double > &thp_array, Scalar bhp, const bool find_largest=true)
 This function finds the value of THP given a specific BHP.
 
static std::pair< Scalar, Scalar > getMinimumBHPCoordinate (const VFPProdTable &table, const Scalar thp, const Scalar wfr, const Scalar gfr, const Scalar alq)
 Get (flo, bhp) at minimum bhp for given thp,wfr,gfr,alq.
 
static std::optional< std::pair< Scalar, Scalar > > intersectWithIPR (const VFPProdTable &table, const Scalar thp, const Scalar wfr, const Scalar gfr, const Scalar alq, const Scalar ipr_a, const Scalar ipr_b, const std::function< Scalar(const Scalar)> &adjust_bhp)
 Get (flo, bhp) at largest occuring stable vfp/ipr-intersection if it exists.
 

Member Function Documentation

◆ findInterpData()

template<class Scalar >
detail::InterpData< Scalar > Opm::VFPHelpers< Scalar >::findInterpData ( const Scalar  value_in,
const std::vector< double > &  values 
)
static

Helper function to find indices etc.

for linear interpolation and extrapolation

Parameters
value_inValue to find in values
valuesSorted list of values to search for value in.
Returns
Data required to find the interpolated value

◆ findTHP()

template<class Scalar >
Scalar Opm::VFPHelpers< Scalar >::findTHP ( const std::vector< Scalar > &  bhp_array,
const std::vector< double > &  thp_array,
Scalar  bhp,
const bool  find_largest = true 
)
static

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"

◆ interpolate()

template<class Scalar >
detail::VFPEvaluation< Scalar > Opm::VFPHelpers< Scalar >::interpolate ( const VFPProdTable table,
const detail::InterpData< Scalar > &  flo_i,
const detail::InterpData< Scalar > &  thp_i,
const detail::InterpData< Scalar > &  wfr_i,
const detail::InterpData< Scalar > &  gfr_i,
const detail::InterpData< Scalar > &  alq_i 
)
static

Helper function which interpolates data using the indices etc.

given in the inputs.


The documentation for this class was generated from the following files: