20#ifndef OPM_AUTODIFF_VFPPROPERTIES_HPP_
21#define OPM_AUTODIFF_VFPPROPERTIES_HPP_
23#include <opm/simulators/wells/VFPInjProperties.hpp>
24#include <opm/simulators/wells/VFPProdProperties.hpp>
25#include <opm/simulators/wells/WellState.hpp>
26#include <opm/simulators/wells/VFPHelpers.hpp>
48 VFPProperties(
const std::vector<std::reference_wrapper<const VFPInjTable>>& inj_tables,
49 const std::vector<std::reference_wrapper<const VFPProdTable>>& prod_tables,
51 :well_state_(well_state)
53 for (
const auto& vfpinj : inj_tables)
56 for (
const auto& vfpprod : prod_tables)
74 double getExplicitWFR(
const int table_id,
const size_t well_index)
const {
75 const auto& rates = well_state_.well(well_index).surface_rates;
76 assert(rates.size() == 3);
77 const auto& pu = well_state_.phaseUsage();
78 const auto& aqua = rates[pu.phase_pos[BlackoilPhases::Aqua]];
79 const auto& liquid = rates[pu.phase_pos[BlackoilPhases::Liquid]];
80 const auto& vapour = rates[pu.phase_pos[BlackoilPhases::Vapour]];
81 const VFPProdTable& table = this->m_prod.
getTable(table_id);
82 return detail::getWFR(table, aqua, liquid, vapour);
85 double getExplicitGFR(
const int table_id,
const size_t well_index)
const {
86 const auto& rates = well_state_.well(well_index).surface_rates;
87 assert(rates.size() == 3);
88 const auto& pu = well_state_.phaseUsage();
89 const auto& aqua = rates[pu.phase_pos[BlackoilPhases::Aqua]];
90 const auto& liquid = rates[pu.phase_pos[BlackoilPhases::Liquid]];
91 const auto& vapour = rates[pu.phase_pos[BlackoilPhases::Vapour]];
92 const VFPProdTable& table = this->m_prod.
getTable(table_id);
93 return detail::getGFR(table, aqua, liquid, vapour);
97 VFPInjProperties m_inj;
98 VFPProdProperties m_prod;
99 const WellState& well_state_;
Definition: VFPInjProperties.hpp:33
void addTable(const VFPInjTable &new_table)
Takes no ownership of data.
Definition: VFPInjProperties.cpp:89
Class which linearly interpolates BHP as a function of rate, tubing head pressure,...
Definition: VFPProdProperties.hpp:37
const VFPProdTable & getTable(const int table_id) const
Returns the table associated with the ID, or throws an exception if the table does not exist.
Definition: VFPProdProperties.cpp:101
void addTable(const VFPProdTable &new_table)
Takes no ownership of data.
Definition: VFPProdProperties.cpp:141
A thin wrapper class that holds one VFPProdProperties and one VFPInjProperties object.
Definition: VFPProperties.hpp:39
VFPProperties(const std::vector< std::reference_wrapper< const VFPInjTable > > &inj_tables, const std::vector< std::reference_wrapper< const VFPProdTable > > &prod_tables, const WellState &well_state)
Constructor Takes no ownership of data.
Definition: VFPProperties.hpp:48
const VFPProdProperties * getProd() const
Returns the VFP properties for production wells.
Definition: VFPProperties.hpp:70
const VFPInjProperties * getInj() const
Returns the VFP properties for injection wells.
Definition: VFPProperties.hpp:63
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: WellState.hpp:56
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27