Make it possible to combine solvent and RESV

Compute the conversion factor for solvent using the RateConverter.hpp
This commit is contained in:
Tor Harald Sandve
2017-11-22 14:39:42 +01:00
parent f2a51d29e7
commit 054361d537
7 changed files with 98 additions and 24 deletions

View File

@@ -26,6 +26,7 @@
#include <opm/autodiff/WellInterface.hpp>
#include <opm/autodiff/ISTLSolver.hpp>
#include <opm/autodiff/RateConverter.hpp>
namespace Opm
{
@@ -104,6 +105,10 @@ namespace Opm
typedef DenseAd::Evaluation<double, /*size=*/numEq + numWellEq> EvalWell;
// For the conversion between the surface volume rate and resrevoir voidage rate
using RateConverterType = RateConverter::
SurfaceToReservoirVoidage<FluidSystem, std::vector<int> >;
// TODO: should these go to WellInterface?
static const int contiSolventEqIdx = BlackoilIndices::contiSolventEqIdx;
static const int contiPolymerEqIdx = BlackoilIndices::contiPolymerEqIdx;
@@ -111,7 +116,10 @@ namespace Opm
static const int polymerConcentrationIdx = BlackoilIndices::polymerConcentrationIdx;
StandardWell(const Well* well, const int time_step, const Wells* wells, const ModelParameters& param);
StandardWell(const Well* well, const int time_step, const Wells* wells,
const ModelParameters& param,
const RateConverterType& rate_converter,
const int pvtRegionIdx);
virtual void init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
@@ -220,6 +228,9 @@ namespace Opm
// the saturations in the well bore under surface conditions at the beginning of the time step
std::vector<double> F0_;
const RateConverterType& rateConverter_;
int pvtRegionIdx_;
// TODO: this function should be moved to the base class.
// while it faces chanllenges for MSWell later, since the calculation of bhp
// based on THP is never implemented for MSWell yet.