Helper class for relperm upscaling applications. More...

#include <RelPermUtils.hpp>

Public Member Functions

 RelPermUpscaleHelper (int mpi_rank, std::map< std::string, std::string > &options_)
 Default constructor. More...
 
void collectResults ()
 Collect results from all MPI nodes. More...
 
std::vector< std::vector< double > > getRelPerm (int phase) const
 Calculate relperm values from phase permeabilities. More...
 
void upscaleSinglePhasePermeability ()
 Upscale single phase permeability. More...
 
void sanityCheckInput (const Opm::Deck &deck, const double minPerm, const double maxPerm, const double minPoro)
 Do sanity checks for input file. More...
 
void checkCriticalSaturations ()
 Check that input relperm curevs specify critical saturations. More...
 
void setupBoundaryConditions ()
 Setup requested boundary conditions. More...
 
double tesselateGrid (const Opm::Deck &deck)
 Tesselate grid. More...
 
void calculateCellPressureGradients ()
 Find cell center pressure gradient for every cell. More...
 
void calculateMinMaxCapillaryPressure ()
 Calculate minimum and maximum capillary pressures. More...
 
void upscaleCapillaryPressure ()
 Upscale capillary pressure. More...
 
std::tuple< double, double > upscalePermeability (int mpi_rank)
 Upscale permeabilities. More...
 

Static Public Member Functions

template<class String >
static Deck parseEclipseFile (const String &eclipseFileName)
 Form Deck object from input file (ECLIPSE format) More...
 

Public Attributes

bool isMaster
 Whether this is the master MPI node or not. More...
 
bool doEclipseCheck
 Whether to check that input relperm curves include relperm at critical saturation points. More...
 
bool anisotropic_input
 Whether input eclipse file has diagonal anisotrophy. More...
 
int points
 Number of saturation points to upscale for. More...
 
int tensorElementCount
 Number of independent elements in resulting tensor. More...
 
bool upscaleBothPhases
 Whether to upscale both phases. More...
 
std::vector< double > WaterSaturation
 Re-upscaled water saturation for the computed pressure points. More...
 
SinglePhaseUpscaler::permtensor_t permTensor
 Tensor of upscaled results. More...
 
std::vector< int > satnums
 Cell satnums. More...
 
std::vector< MonotCubicInterpolator > InvJfunctions
 
std::array< std::array< std::vector< MonotCubicInterpolator >, 2 >, 3 > Krfunctions
 Relperm-curves for each (component->phase->stone type) More...
 
SinglePhaseUpscaler::BoundaryConditionType boundaryCondition
 Boundary conditions to use. More...
 
std::vector< MonotCubicInterpolator > SwPcfunctions
 Holds Sw(Pc) for each rocktype. More...
 
std::string saturationstring
 Fluid system type. More...
 
size_t tesselatedCells
 Number of "active" cells (Sintef interpretation of "active") More...
 
double volume
 Total volume. More...
 
double poreVolume
 Total pore volume. More...
 
std::vector< double > pressurePoints
 Vector of capillary pressure points between Swor and Swir. More...
 

Detailed Description

Helper class for relperm upscaling applications.

Constructor & Destructor Documentation

◆ RelPermUpscaleHelper()

Opm::RelPermUpscaleHelper::RelPermUpscaleHelper ( int  mpi_rank,
std::map< std::string, std::string > &  options_ 
)

Default constructor.

Parameters
[in]mpi_rankRank of this process (for parallel simulations).
[in]optionsOptions structure.

Uses the following options: fluids

Member Function Documentation

◆ calculateCellPressureGradients()

void Opm::RelPermUpscaleHelper::calculateCellPressureGradients ( )

Find cell center pressure gradient for every cell.

Uses the following options: gravity, waterDensity, oilDensity

◆ calculateMinMaxCapillaryPressure()

void Opm::RelPermUpscaleHelper::calculateMinMaxCapillaryPressure ( )

Calculate minimum and maximum capillary pressures.

Uses the following options: maxPermContrast, minPerm, gravity, linsolver_tolerance

◆ checkCriticalSaturations()

void Opm::RelPermUpscaleHelper::checkCriticalSaturations ( )

Check that input relperm curevs specify critical saturations.

◆ collectResults()

void Opm::RelPermUpscaleHelper::collectResults ( )

Collect results from all MPI nodes.

◆ getRelPerm()

std::vector< std::vector< double > > Opm::RelPermUpscaleHelper::getRelPerm ( int  phase) const

Calculate relperm values from phase permeabilities.

Parameters
[in]phaseThe phase to calculate values for (0-indexed).
Returns
The phase permeability tensor values.

First index is voigt index, second index is pressure point.

◆ parseEclipseFile()

template<class String >
Deck Opm::RelPermUpscaleHelper::parseEclipseFile ( const String &  eclipseFileName)
static

Form Deck object from input file (ECLIPSE format)

Template Parameters
StringString type for representing pathnames. Typically
std::string
or
const char*
.
Parameters
[in]eclipseFileNameName of input ECLIPSE file.
Returns
Deck object resulting from parsing input file.

References Opm::addNonStandardUpscalingKeywords().

◆ sanityCheckInput()

void Opm::RelPermUpscaleHelper::sanityCheckInput ( const Opm::Deck &  deck,
const double  minPerm,
const double  maxPerm,
const double  minPoro 
)

Do sanity checks for input file.

Parameters
[in]deckThe deck to sanity check.
[in]minPermMinimum permeability.
[in]maxPermMaximum permeability.
[in]minPoroMinimum porosity.

Throws error string.

◆ setupBoundaryConditions()

void Opm::RelPermUpscaleHelper::setupBoundaryConditions ( )

Setup requested boundary conditions.

Uses the following options: bc

◆ tesselateGrid()

double Opm::RelPermUpscaleHelper::tesselateGrid ( const Opm::Deck &  deck)

Tesselate grid.

Parameters
[in]deckThe grid to tesselate.
[in]optionsOption structure.

Uses the following options: linsolver_tolerance, linsolver_verbosity, linsolver_type, linsolver_max_iterations, linsolver_smooth_steps, linsolver_prolongate_factor, minPerm

Returns
Time used for tesselation.

◆ upscaleCapillaryPressure()

void Opm::RelPermUpscaleHelper::upscaleCapillaryPressure ( )

Upscale capillary pressure.

Uses the following options: saturationThreshold

◆ upscalePermeability()

std::tuple< double, double > Opm::RelPermUpscaleHelper::upscalePermeability ( int  mpi_rank)

Upscale permeabilities.

Parameters
[in]mpi_rankMPI rank of this process.

Uses the following options: minPerm, maxPermContrast

Returns
Tuple with (total time, time per point).

◆ upscaleSinglePhasePermeability()

void Opm::RelPermUpscaleHelper::upscaleSinglePhasePermeability ( )

Upscale single phase permeability.

Member Data Documentation

◆ anisotropic_input

bool Opm::RelPermUpscaleHelper::anisotropic_input

Whether input eclipse file has diagonal anisotrophy.

◆ boundaryCondition

SinglePhaseUpscaler::BoundaryConditionType Opm::RelPermUpscaleHelper::boundaryCondition

Boundary conditions to use.

◆ doEclipseCheck

bool Opm::RelPermUpscaleHelper::doEclipseCheck

Whether to check that input relperm curves include relperm at critical saturation points.

◆ InvJfunctions

std::vector<MonotCubicInterpolator> Opm::RelPermUpscaleHelper::InvJfunctions

Inverse of the loaded J-functions.

◆ isMaster

bool Opm::RelPermUpscaleHelper::isMaster

Whether this is the master MPI node or not.

◆ Krfunctions

std::array<std::array<std::vector<MonotCubicInterpolator>,2>,3> Opm::RelPermUpscaleHelper::Krfunctions

Relperm-curves for each (component->phase->stone type)

◆ permTensor

SinglePhaseUpscaler::permtensor_t Opm::RelPermUpscaleHelper::permTensor

Tensor of upscaled results.

◆ points

int Opm::RelPermUpscaleHelper::points

Number of saturation points to upscale for.

◆ poreVolume

double Opm::RelPermUpscaleHelper::poreVolume

Total pore volume.

◆ pressurePoints

std::vector<double> Opm::RelPermUpscaleHelper::pressurePoints

Vector of capillary pressure points between Swor and Swir.

◆ satnums

std::vector<int> Opm::RelPermUpscaleHelper::satnums

Cell satnums.

◆ saturationstring

std::string Opm::RelPermUpscaleHelper::saturationstring

Fluid system type.

◆ SwPcfunctions

std::vector<MonotCubicInterpolator> Opm::RelPermUpscaleHelper::SwPcfunctions

Holds Sw(Pc) for each rocktype.

◆ tensorElementCount

int Opm::RelPermUpscaleHelper::tensorElementCount

Number of independent elements in resulting tensor.

◆ tesselatedCells

size_t Opm::RelPermUpscaleHelper::tesselatedCells

Number of "active" cells (Sintef interpretation of "active")

◆ upscaleBothPhases

bool Opm::RelPermUpscaleHelper::upscaleBothPhases

Whether to upscale both phases.

◆ volume

double Opm::RelPermUpscaleHelper::volume

Total volume.

◆ WaterSaturation

std::vector<double> Opm::RelPermUpscaleHelper::WaterSaturation

Re-upscaled water saturation for the computed pressure points.


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