Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region > Class Template Reference

#include <RateConverter.hpp>

Public Types

using RegionId = typename RegionMapping< Region >::RegionId
 

Public Member Functions

 SurfaceToReservoirVoidage (const PhaseUsage &phaseUsage, const Region &region)
 
template<typename ElementContext , class Simulator >
void defineState (const Simulator &simulator)
 
template<class Coeff >
void calcCoeff (const RegionId r, const int pvtRegionIdx, Coeff &coeff) const
 
template<class Coeff , class Rates >
void calcCoeff (const RegionId r, const int pvtRegionIdx, const Rates &surface_rates, Coeff &coeff) const
 
template<class Coeff >
void calcCoeff (const int pvtRegionIdx, const double p, const double rs, const double rv, const double rsw, const double rvw, const double T, const double saltConcentration, Coeff &coeff) const
 
template<class Coeff >
void calcInjCoeff (const RegionId r, const int pvtRegionIdx, Coeff &coeff) const
 
template<class Rates >
void calcReservoirVoidageRates (const RegionId r, const int pvtRegionIdx, const Rates &surface_rates, Rates &voidage_rates) const
 
template<typename SurfaceRates , typename VoidageRates >
void calcReservoirVoidageRates (const int pvtRegionIdx, const double p, const double rs, const double rv, const double rsw, const double rvw, const double T, const double saltConcentration, const SurfaceRates &surface_rates, VoidageRates &voidage_rates) const
 
template<class Rates >
std::pair< double, double > inferDissolvedVaporisedRatio (const double rsMax, const double rvMax, const Rates &surface_rates) const
 
template<class SolventModule >
void calcCoeffSolvent (const RegionId r, const int pvtRegionIdx, double &coeff) const
 

Detailed Description

template<class FluidSystem, class Region>
class Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >

Convert component rates at surface conditions to phase (voidage) rates at reservoir conditions.

The conversion uses fluid properties evaluated at average hydrocarbon pressure in regions or field.

Template Parameters
FluidSystemFluid system class. Expected to be a BlackOilFluidSystem
RegionType of a forward region mapping. Expected to provide indexed access through
operator[]()
as well as inner types value_type, size_type, and const_iterator. Typically
std::vector<int>
.

Member Typedef Documentation

◆ RegionId

template<class FluidSystem , class Region >
using Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::RegionId = typename RegionMapping<Region>::RegionId

Region identifier.

Integral type.

Constructor & Destructor Documentation

◆ SurfaceToReservoirVoidage()

template<class FluidSystem , class Region >
Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::SurfaceToReservoirVoidage ( const PhaseUsage phaseUsage,
const Region &  region 
)
inline

Constructor.

Parameters
[in]regionForward region mapping. Often corresponds to the "FIPNUM" mapping of an ECLIPSE input deck.

Member Function Documentation

◆ calcCoeff() [1/3]

template<class FluidSystem , class Region >
template<class Coeff >
void Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::calcCoeff ( const int  pvtRegionIdx,
const double  p,
const double  rs,
const double  rv,
const double  rsw,
const double  rvw,
const double  T,
const double  saltConcentration,
Coeff &  coeff 
) const

◆ calcCoeff() [2/3]

template<class FluidSystem , class Region >
template<class Coeff >
void Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::calcCoeff ( const RegionId  r,
const int  pvtRegionIdx,
Coeff &  coeff 
) const

Compute coefficients for surface-to-reservoir voidage conversion.

Template Parameters
InputType representing contiguous collection of component rates at surface conditions. Must support direct indexing through
operator[]()
.
CoeffType representing contiguous collection of surface-to-reservoir conversion coefficients. Must support direct indexing through
operator[]()
.
Parameters
[in]rFluid-in-place region of the well
[in]pvtRegionIdxPVT region of the well
[out]coeffSurface-to-reservoir conversion coefficients that can be used to compute total reservoir volumes from surface volumes with the formula q_{rT} = \sum_p coeff[p] q_{sp}. However, individual phase reservoir volumes cannot be calculated from these coefficients (i.e. q_{rp} is not equal to coeff[p] q_{sp}) since they can depend on more than one surface volume rate when we have dissolved gas or vaporized oil.

◆ calcCoeff() [3/3]

template<class FluidSystem , class Region >
template<class Coeff , class Rates >
void Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::calcCoeff ( const RegionId  r,
const int  pvtRegionIdx,
const Rates &  surface_rates,
Coeff &  coeff 
) const

◆ calcCoeffSolvent()

template<class FluidSystem , class Region >
template<class SolventModule >
void Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::calcCoeffSolvent ( const RegionId  r,
const int  pvtRegionIdx,
double &  coeff 
) const
inline

Compute coefficients for surface-to-reservoir voidage conversion for solvent.

Parameters
[in]rFluid-in-place region of the well
[in]pvtRegionIdxPVT region of the well
[out]doubleSurface-to-reservoir conversion coefficients for solvent.

◆ calcInjCoeff()

template<class FluidSystem , class Region >
template<class Coeff >
void Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::calcInjCoeff ( const RegionId  r,
const int  pvtRegionIdx,
Coeff &  coeff 
) const

◆ calcReservoirVoidageRates() [1/2]

template<class FluidSystem , class Region >
template<typename SurfaceRates , typename VoidageRates >
void Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::calcReservoirVoidageRates ( const int  pvtRegionIdx,
const double  p,
const double  rs,
const double  rv,
const double  rsw,
const double  rvw,
const double  T,
const double  saltConcentration,
const SurfaceRates &  surface_rates,
VoidageRates &  voidage_rates 
) const

Convert surface volume flow rates to reservoir voidage flow rates.

State independent version.

Template Parameters
RatesType representing contiguous collection of surface flow rates. Must support direct indexing through
operator[]()
.
Parameters
[in]pvtRegionIdxPVT region.
[in]pFluid pressure.
[in]rsDissolved gas/oil ratio.
[in]rvVaporised oil/gas ratio.
[in]rswDissolved gas/water ratio.
[in]rwvVaporised water/gas ratio.
[in]TTemperature. Unused in non-thermal simulation runs.
[in]saltConcentrationSalt concentration. Unused in simulation runs without salt precipitation.
[in]surface_ratesSurface volume flow rates for all active phases.
[out]voidage_ratesReservoir volume flow rates for all active phases.

◆ calcReservoirVoidageRates() [2/2]

template<class FluidSystem , class Region >
template<class Rates >
void Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::calcReservoirVoidageRates ( const RegionId  r,
const int  pvtRegionIdx,
const Rates &  surface_rates,
Rates &  voidage_rates 
) const

Convert surface volume flow rates to reservoir voidage flow rates.

State dependent version. Client must call

void defineState(const Simulator &simulator)
Definition: RateConverter.hpp:94

prior to invoking this member function.

Template Parameters
RatesType representing contiguous collection of surface flow rates. Must support direct indexing through
operator[]()
.
Parameters
[in]rZero based fluid-in-place region index.
[in]pvtRegionIdxZero based PVT region index.
[in]surface_ratessurface volume flow rates for all active phases.
[out]voidage_ratesreservoir volume flow rates for all active phases.

◆ defineState()

template<class FluidSystem , class Region >
template<typename ElementContext , class Simulator >
void Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::defineState ( const Simulator &  simulator)
inline

Compute pore volume averaged hydrocarbon state pressure, rs and rv.

Fluid properties are evaluated at average hydrocarbon state for purpose of conversion from surface rate to reservoir voidage rate.

References Opm::RegionAttributeHelpers::PhaseUsed::gas(), Opm::RegionAttributeHelpers::PhaseUsed::oil(), OPM_BEGIN_PARALLEL_TRY_CATCH, OPM_END_PARALLEL_TRY_CATCH, and Opm::RegionAttributeHelpers::PhaseUsed::water().

◆ inferDissolvedVaporisedRatio()

template<class FluidSystem , class Region >
template<class Rates >
std::pair< double, double > Opm::RateConverter::SurfaceToReservoirVoidage< FluidSystem, Region >::inferDissolvedVaporisedRatio ( const double  rsMax,
const double  rvMax,
const Rates &  surface_rates 
) const

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