21#ifndef OPM_AUTODIFF_VFPHELPERS_HPP_
22#define OPM_AUTODIFF_VFPHELPERS_HPP_
46T getFlo(
const VFPProdTable& table,
57T getFlo(
const VFPInjTable& table,
67T getWFR(
const VFPProdTable& table,
77T getGFR(
const VFPProdTable& table,
86 InterpData() : ind_{0, 0}, inv_dist_(0.0), factor_(0.0) {}
98InterpData findInterpData(
const double value_in,
const std::vector<double>& values);
104 VFPEvaluation() : value(0.0), dthp(0.0), dwfr(0.0), dgfr(0.0), dalq(0.0), dflo(0.0) {};
141 const double explicit_wfr,
142 const double explicit_gfr,
143 const bool use_vfpexplicit);
156const T& getTable(
const std::map<
int, std::reference_wrapper<const T>>& tables,
int table_id);
162bool hasTable(
const std::map<
int, std::reference_wrapper<const T>>& tables,
int table_id) {
163 const auto entry = tables.find(table_id);
164 return (entry != tables.end() );
171template <
typename TYPE,
typename TABLE>
172TYPE getType(
const TABLE& table);
181double findTHP(
const std::vector<double>& bhp_array,
182 const std::vector<double>& thp_array,
188std::pair<double, double>
189getMinimumBHPCoordinate(
const VFPProdTable& table,
199std::optional<std::pair<double, double>>
200intersectWithIPR(
const VFPProdTable& table,
207 const std::function<
double(
const double)>& adjust_bhp);
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27
Helper struct for linear interpolation.
Definition VFPHelpers.hpp:85
An "ADB-like" structure with a single value and a set of derivatives.
Definition VFPHelpers.hpp:103